JWT Service
This GRPC service handles tasks releated to generation and validation of JWTs.
Functions
FreshToken
This function takes user identity and scopes as an input. The function then creates a fresh access token from the inputs and returns the fresh access token.
AcessAndRefreshTokens
This function takes user identity and scopes as an input. The function then creates access and refresh token from the inputs and returns both of the tokens
RefreshTokens
This function takes a refresh token as an input. The function extracts user identity and scopes from the refresh token. The function then creates new access and refresh tokens and returns both of the tokens.
ValidateToken
This function takes any type of token as an input. The function validates that token and returns if the token is valid.
Token Claims
type Claims struct {
UserIdentity string
IsFresh bool
IsRefresh bool
Scopes []string
CreationUTC int64
ExpirationUTC int64
}