Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignUp ¶ added in v1.1.0
func SignUp(request *CreateAccountRequest) (int, *data.APIResponse, string, time.Time)
SignUp internal
Types ¶
type API ¶
type API struct{}
API api endpoints
func (API) GoogleCallback ¶
GoogleCallback handle google callback
type CreateAccountRequest ¶
type CreateAccountRequest struct { Email string `json:"email" xml:"email" form:"email" binding:"required"` Username string `json:"username" xml:"username" form:"username" binding:"required"` Password string `json:"password" xml:"password" form:"password" binding:"required"` ConfirmPassword string `json:"confirmPassword" xml:"confirmPassword" form:"confirmPassword" binding:"required"` }
CreateAccountRequest /signup
type GoogleUserInfo ¶
type GoogleUserInfo struct { ID string `json:"id"` FamilyName string `json:"family_name"` Name string `json:"name"` Picture string `json:"picture"` Local string `json:"local"` Email string `json:"Email"` GivenName string `json:"GivenName"` VerifiedEmail bool `json:"verified_email"` }
GoogleUserInfo user info
type JWTClaim ¶
type JWTClaim struct { ImageURL string `json:"image_url"` jwt.StandardClaims }
JWTClaim web claim
func GetClaimFromCookieAndRenew ¶
GetClaimFromCookieAndRenew get claim and renew
func GetClaimFromHeaderAndRenew ¶
GetClaimFromHeaderAndRenew get claim and renew. Since auth token is httponly, it will not really be able to get from javascript
func GetClaimInContext ¶
GetClaimInContext get claim struct from context
type LoginRequest ¶
type LoginRequest struct { Email string `json:"email" xml:"email" form:"email" binding:"required"` Password string `json:"password" xml:"password" form:"password" binding:"required"` }
LoginRequest login request
type UpdatePasswordRequest ¶
type UpdatePasswordRequest struct { CurrentPassword string `json:"currentPassword" xml:"currentPassword" form:"currentPassword" binding:"required"` Password string `json:"password" xml:"password" form:"password" binding:"required"` ConfirmPassword string `json:"confirmPassword" xml:"confirmPassword" form:"confirmPassword" binding:"required"` }
UpdatePasswordRequest /api/account/update/password
Click to show internal directories.
Click to hide internal directories.