Rest services using Java
https://spring.io/guides/gs/spring-boot/
Remember add dependencies to use annotations and every implementation in springboot framework in build.gradle
''' implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.springframework.boot:spring-boot-starter-web' '''
''' // Refresh dependencies ./gradlew build --refresh-dependencies // Runs the application ./gradlew bootRun // Run the tests ./gradlew test '''
Spring Boot Token based Authentication with Spring Security & JWT
command
'''shell mysql -u root -p '''
We can log out storing the token on the black list cache.
When a user performs logout action, the client should call a server API and in this API will add this token into the blocklist sections either in the cache Redis or database. So the validating token process you check if the token is in blocklist or not.