Documentation ¶
Index ¶
Constants ¶
View Source
const ( ALGRAS = "rsa" ACCESS = "access" REGISTERVERIFY = "register_verify" PASSWORDRESET = "password_reset" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPayload ¶ added in v0.4.0
type AccessPayload struct { Payload UserID uint `json:"sub"` AppID string `json:"iss"` Scopes []string `json:"scopes"` }
func NewAccessPayload ¶ added in v0.4.0
func NewAccessPayload(userID uint, scopes string, appID string, expire int64) *AccessPayload
type IDTokenPayload ¶ added in v1.0.0
type IDTokenPayload struct { Payload UserID uint `json:"sub"` AppID string `json:"iss"` Role string `json:"role"` Name string `json:"name"` Mail string `json:"mail"` }
func NewIDTokenPayload ¶ added in v1.0.0
func NewIDTokenPayload(userID uint, role, name, mail, appID string, expire int64) *IDTokenPayload
type JWT ¶
func GenerateRSAJWT ¶
func GenerateRSAJWT(payload interface{}) (*JWT, *perror.PlutoError)
func VerifyB64JWT ¶
func VerifyB64JWT(b64JWTToken string) (*JWT, *perror.PlutoError)
type PasswordResetPayload ¶
func NewPasswordResetPayload ¶
func NewPasswordResetPayload(mail string, expire int64) *PasswordResetPayload
type RegisterVerifyPayload ¶
func NewRegisterVerifyPayload ¶
func NewRegisterVerifyPayload(userID uint, expire int64) *RegisterVerifyPayload
Click to show internal directories.
Click to hide internal directories.