Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sparkjava-jwt - example SparkJava - JWT integration

License

NotificationsYou must be signed in to change notification settings

rjozefowicz/sparkjava-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example SparkJava - JWT integration

tech

Public available endpoints

ENDPOINTHTTP METHODPARAMSDESCRIPTION
/auth/registerPOSTJSON body mandatory fields: userName, password. Additional fields firstName, secondNameNew user registration
/auth/loginPOSTJSON body mandatory fields: userName, passwordUser login

Additional JWT endpoints

HTTP Header:Authorization: Bearer JWTToken

ENDPOINTHTTP METHODPARAMSDESCRIPTION
/auth/tokenPOSTJWT token refresh
/auth/logoutPOSTJWT token revocation
/auth/meGETUser details

Roles

Predefined user roles:

  • ADMIN
  • MANAGER
  • DEVELOPER

Endpoints for Role management:

ENDPOINTHTTP METHODPARAMSDESCRIPTION
/auth/rolesPOSTJSON body mandatory fields: userName, roleAdd new Role to user
/auth/rolesDELETEJSON body mandatory fields: userName, roleRevoke Role from User

Admin user

Predefined Admin user (admin/admin)

Additional

Cron job (every minute) to clean up revoked JWT Tokens

About

sparkjava-jwt - example SparkJava - JWT integration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp