Documentation ¶
Index ¶
- type Claims
- type JWT
- func (jwt JWT) AccessAndRefreshTokens(userIdentity string, scopesRequested []string) (string, string)
- func (jwt JWT) FreshToken(userIdentity string) string
- func (jwt JWT) RefreshTokens(refreshTokenString string) (string, string, string, error)
- func (jwt JWT) ValidateToken(tokenString string) (bool, Claims, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { UserIdentity string `json:"UserIdentity"` IsFresh bool `json:"IsFresh"` IsRefresh bool `json:"IsRefresh"` Scopes []string `json:"Scopes"` CreationUTC int64 `json:"CreationUTC"` ExpirationUTC int64 `json:"ExpirationUTC"` jwt.StandardClaims }
Claims is used to store jwt claims
type JWT ¶
type JWT struct{}
JWT is a low level JSON web token manager
func (JWT) AccessAndRefreshTokens ¶
func (jwt JWT) AccessAndRefreshTokens( userIdentity string, scopesRequested []string) (string, string)
AccessAndRefreshTokens is used to generate access and refresh token
func (JWT) FreshToken ¶
FreshToken is used to generate a fresh access token
func (JWT) RefreshTokens ¶
RefreshTokens is used to generate new access and refresh token based on previous refresh token
Click to show internal directories.
Click to hide internal directories.