Documentation ¶
Index ¶
Constants ¶
View Source
const ( RS256ALGRAS = "RS256" ACCESS = "access" REGISTERVERIFY = "register_verify" PASSWORDRESET = "password_reset" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPayload ¶
type AccessPayload struct { Payload UserID uint `json:"sub"` AppID string `json:"iss"` Scopes []string `json:"scopes"` }
func NewAccessPayload ¶
func NewAccessPayload(userID uint, scopes string, appID string, expire int64) *AccessPayload
type IDTokenPayload ¶
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 ¶
func NewIDTokenPayload(userID uint, role, name, mail, appID string, expire int64) *IDTokenPayload
type JWT ¶
func GenerateRSA256JWT ¶
func GenerateRSA256JWT(payload interface{}) (*JWT, *perror.PlutoError)
func VerifyB64RS256JWT ¶
func VerifyB64RS256JWT(b64JWTToken string) (*JWT, *perror.PlutoError)
func VerifyRS256JWT ¶
func VerifyRS256JWT(token string) (*JWT, *perror.PlutoError)
func (*JWT) UnmarshalPayload ¶
func (jwt *JWT) UnmarshalPayload(v interface{}) *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.