jwt-srv

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 6 Imported by: 0

README

JWT Service

Token Types

Access token
This is the token which will allow the client to get data from resource server.
Fresh Access Token
This is simiral to access token, but extremely short lived. Tasks such as changing the password, would client to have a fresh access token.
Refresh Token
This token can be used to refresh access token (NOT FRESH ACCESS TOKEN).

Claims

These are the claims in every token, defined at global/config/types.go
{
    "UserIdentity" : "An identity of user"
    "IsFresh" : "Boolean value saying if the token is fresh toke",      
    "IsRefresh" : "Booleean value saying if the token is refresh token",
    "Scopes" : "All the scopes",       
    "CreationUTC"  : "Timestamp of when the token was created",
    "ExpirationUTC" : "Timestamp of when the token will expire,
}

Service Functions

these are the functions of the service, also defined in proto/jwt-srv.proto
FreshToken
Takes in user identity and returnes fresh access token.
AccessAndRefreshTokens
Takes in user identity and scopes, then returnes access and refresh tokens.
RefreshTokens
Takes in refresh token, validates it, then returned new access and refresh token.
ValidateToken
Takes in token and token type, then validates it.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL