https://github.com/stormpath/roadstorm-jwt-csrf-tutorial
https://github.com/stormpath/roadstorm-jwt-csrf-tutorial
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/stormpath/roadstorm-jwt-csrf-tutorial
- Owner: stormpath
- Created: 2016-07-20T19:26:52.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-06T16:52:15.000Z (about 9 years ago)
- Last Synced: 2025-04-30T05:04:06.666Z (about 1 year ago)
- Language: Java
- Size: 14.6 KB
- Stars: 6
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#Stormpath is Joining Okta
We are incredibly excited to announce that [Stormpath is joining forces with Okta](https://stormpath.com/blog/stormpaths-new-path?utm_source=github&utm_medium=readme&utm-campaign=okta-announcement). Please visit [the Migration FAQs](https://stormpath.com/oktaplusstormpath?utm_source=github&utm_medium=readme&utm-campaign=okta-announcement) for a detailed look at what this means for Stormpath users.
We're available to answer all questions at [support@stormpath.com](mailto:support@stormpath.com).
## JWT Fun
This tutorial walks you through the various features supported by the [JJWT](https://github.com/jwtk/jjwt) library - a fluent interface Java JWT building and parsing library.
### Build and Run
It's super easy to build and exercise this tutorial.
```
mvn clean install
java -jar target/*.jar
```
That's it!
You can hit the home endpoint with your favorite command-line http client. My favorite is: [httpie](https://github.com/jkbrzt/httpie)
`http localhost:8080`
```
Available commands (assumes httpie - https://github.com/jkbrzt/httpie):
http http://localhost:8080/
This usage message
http http://localhost:8080/static-builder
build JWT from hardcoded claims
http POST http://localhost:8080/dynamic-builder-general claim-1=value-1 ... [claim-n=value-n]
build JWT from passed in claims (using general claims map)
http POST http://localhost:8080/dynamic-builder-specific claim-1=value-1 ... [claim-n=value-n]
build JWT from passed in claims (using specific claims methods)
http POST http://localhost:8080/dynamic-builder-compress claim-1=value-1 ... [claim-n=value-n]
build DEFLATE compressed JWT from passed in claims
http http://localhost:8080/parser?jwt=
Parse passed in JWT
http http://localhost:8080/parser-enforce?jwt=
Parse passed in JWT enforcing the 'iss' registered claim and the 'hasMotorcycle' custom claim
```
The Baeldung post that compliments this repo can be found [here](http://www.baeldung.com/)