TOMEE-2332 MP-jwt-jwk example#342
TOMEE-2332 MP-jwt-jwk example#342cotnic wants to merge 3 commits intoapache:masterfrom cotnic:TOMEE-2332
Conversation
TODO: Implement the JWT JWK functionalities
jeanouii
left a comment
There was a problem hiding this comment.
The sample is great and ready to be merged. I left some comments for the sake of having the discussion and hopefully clarify some stuff;
examples/mp-rest-jwt-jwk/README.adoc
Outdated
| .... | ||
| . Annotate our `Application.class` with `@LoginConfig(authMethod = "MP-JWT")` | ||
|
|
||
| . Provide public and private key for authentication. And specify the location of the public key and the issuer in our |
There was a problem hiding this comment.
What's actually required is the public key because MicroProfile JWT targets the validation side (consuming a JWT). The private key would be useful on the producer side of things such as an identity provider, or an API Gateway.
examples/mp-rest-jwt-jwk/README.adoc
Outdated
|
|
||
| We access endpoints from our test class by creating a `JWT` with the help of | ||
| our `TokenUtils.generateJWTString(String jsonResource, String keyId)` which signs our user | ||
| data in json format with the help of our `src/test/resources/{keyId}` key. |
There was a problem hiding this comment.
This is where you need the private key, but this is for testing purpose to generate a valide and signed JWT
examples/mp-rest-jwt-jwk/pom.xml
Outdated
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <!-- |
There was a problem hiding this comment.
Small detail, but looks like some test dependencies are before this section, not sure it's intended or not.
It's a detail so won't prevent the merge at all
|
@jeanouii I've changed and improved the README and pom.xml based on your comments. |
|
Looks great @cotnic . Merged! |
Implemented the MP-jwt for JWKs public key example.
Also included the usage of MP-rest-client for testing.