Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IssueClaims ¶
func IssueClaims(claims *CustomClaims, secret string) (tokenString string, err error)
Types ¶
type CustomClaims ¶
type CustomClaims struct { KeyID string `json:"kid,omitempty"` Id string `json:"jti,omitempty"` Type string `json:"typ,omitempty"` Subject string `json:"sub,omitempty"` Audience string `json:"aud,omitempty"` Issuer string `json:"iss,omitempty"` IssuedAt int64 `json:"iat,omitempty"` NotBefore int64 `json:"nbf,omitempty"` ExpiresAt int64 `json:"exp,omitempty"` }
func (CustomClaims) GetExpiresAtSeconds ¶
func (c CustomClaims) GetExpiresAtSeconds() (expiresAtInSeconds int)
func (CustomClaims) Valid ¶
func (c CustomClaims) Valid() (err error)
Click to show internal directories.
Click to hide internal directories.