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 ¶ 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 GenerateRSA256JWT ¶ added in v1.3.1
func GenerateRSA256JWT(payload interface{}) (*JWT, *perror.PlutoError)
func VerifyB64RS256JWT ¶ added in v1.3.1
func VerifyB64RS256JWT(b64JWTToken string) (*JWT, *perror.PlutoError)
func VerifyRS256JWT ¶ added in v1.3.1
func VerifyRS256JWT(token string) (*JWT, *perror.PlutoError)
func (*JWT) UnmarshalPayload ¶ added in v1.3.2
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.