api

package
v0.0.0-...-deaf358 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitAuthPath           = "/oauth/{provider}/init"
	OAuthCallbackPath      = "/oauth/{provider}/callback"
	OAuthGrantInitPath     = "/oauth/grant/{grant}/init"
	OAuthGrantValidatePath = "/oauth/grant/{grant}/validate"
)

Variables

This section is empty.

Functions

func GrantOAuthValidate

func GrantOAuthValidate(w http.ResponseWriter, r *http.Request)

func InitGrantOAuth

func InitGrantOAuth(w http.ResponseWriter, r *http.Request)

func InitOAuth

func InitOAuth(w http.ResponseWriter, r *http.Request)

func OAuthCallback

func OAuthCallback(w http.ResponseWriter, r *http.Request)

func RegisterRoutes

func RegisterRoutes(router chi.Router)

Types

type GrantOAuthUserRequestBody

type GrantOAuthUserRequestBody struct {
	FullName          string `json:"full_name"`
	Email             string `json:"email"`
	PhoneNumber       string `json:"phone_number"`
	ProfilePictureUrl string `json:"profile_picture_url,omitempty"`
	Username          string `json:"username"`
	Password          string `json:"password"`
}

type GrantOAuthValidateRequestBody

type GrantOAuthValidateRequestBody struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type GrantOAuthValidateResponseBody

type GrantOAuthValidateResponseBody struct {
	FullName          string `json:"full_name"`
	Email             string `json:"email"`
	PhoneNumber       string `json:"phone_number"`
	ProfilePictureUrl string `json:"profile_picture_url"`
	Username          string `json:"username"`
}

type OAuthInitRequestBody

type OAuthInitRequestBody struct {
	Provider string `json:"provider"`
}

type OAuthInitResponseBody

type OAuthInitResponseBody struct {
	RedirectUrl string `json:"redirectUrl"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL