JWTenizr will generate:
jwtenizr-config.jsonwith public, private key and target folder of microprofile-config.properties
jwt-token.json: with Minimum MP-JWT Required Claims, a sample principal and a few groups. UPN becomes the Java EE principal, the groups are automatically mapped to Java EE roles.
token.jwt: with information loaded from: jwt-token.json and can be used as input for automated system tests
microprofile-config.propertiescomprising the public key an the issuer: copy to your WAR/src/main/resources/META-INF
curlcommand. Is ready to use for testing with
Authorizationheader and included token:
curl -i -H'Authorization: Bearer eyJraW¢...(generated JWT token)' http://localhost:8080[RESOURCE and SUB-RESOURCES]
The JWT's claims and
Principal become directly injectable and you can rely on the stock
@PermitAll annotations to guard methods.
airhacks.fm the podcast:
Stay in touch: airhacks.news.