Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

romajs-demos/demo-spring-boot-security-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

demo-spring-boot-security-jwt

java-jdk spring-boot codecov

Web API

URL: http://localhost:8080

Authentication

Request

curl -i http://localhost:8080/login -H 'Content-Type: application/json' -d '{"username":"admin","password":"123"}' -X POST

Response

HTTP/1.1 200
Authorization: Bearer <your generated jwt>

Authenticated access

Request

curl -i http://localhost:8080/hello/world -H 'Authorization: Bearer <your generated jwt> '

Response

HTTP/1.1 200
Hello World!

Authenticated user details

Request

curl -i http://localhost:8080/user/details -H 'Authorization: Bearer <your generated jwt> '

Response

HTTP/1.1 200
admin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages