Skip to content

Stateless authentication using JWT, access token generated when user log in to his account. need to provide the access token to get ressources. refresh token is provided along with the accesss token for regenerating a new accesss token.

Notifications You must be signed in to change notification settings

DraouiAbdo/stateless-jwt-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stateless-jwt-authentication

Microservices based apps are secured using stateless authentication as servers are not required to save data session of each client.

JWT (Json Web Token) is a string which is generated by the authentication service of the app and that is one a user log in to his account. if correct credentials are provided, the client will receive access token in the response, usually in a form of header or in the body of the response.

To access ressources of the app, the access token should be included in the request of the client.

The access token has an expiration date, if the token expire, the client should have a new access token.

What a user can do with the app depends on the pieces of information incorporated in the token payload. to change access rights for the user or to keep him logged in to his account. generally two tokens are provided to the user, an access token with short validity duration and a refresh token with a longer validity date.

The user through the client app log in to his account,he/she can access ressources of the app as long as the access token hasn't expired. if this last expire, client app should be set up to send the refresh token to get a new access token.

In this repo, a demo app is developped to show how stateless authentication is performed using the JWT.

About

Stateless authentication using JWT, access token generated when user log in to his account. need to provide the access token to get ressources. refresh token is provided along with the accesss token for regenerating a new accesss token.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages