himadieievsv / expire-jwt-token

How to expire JSON Web Token (JWT) manually, without storing it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

This is a sample application, created in order to demonstrate how we can expire JWT manually without storing it.

Token invalidation way:

Using random salt per user, so we can change that salt on logout and invalidate all tokens issued with that salt.

Look here for start:

  • com.jwtdemo.application.service.JwtService - here api access token is issued and validated.
  • com.jwtdemo.application.auth.DemoAuthenticationProvider - authorization with JWT token and check salt.

About

How to expire JSON Web Token (JWT) manually, without storing it.


Languages

Language:Java 100.0%