Challenge: Use a JWT Token and Call a JAX-RS Endpoint
Use a JWT token and call a JAX-RS endpoint in this challenge.
We'll cover the following
Problem statement
This problem extends the challenge from “Form Based Authentication With PrimeFaces” so that the application generates a JWT token and calls a JAX-RS endpoint in a second application. The result of the challenge lesson “Use Form Based Authentication With PrimeFaces” can be used as service-a
where we need to add the creation of the JWT token. Service-b
contains the endpoint that requires a valid JWT and returns a claim, similar to what took place in “JWT Token with standards.”
Try it yourself
Note: Your code will use the following methods in the widget below.
createToken()
generateJWT()
createRSAKey()
readPemFile()
Get hands-on with 1200+ tech skills courses.