You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2018/12/12 16:02:33 UTC
[09/11] tomee git commit: TOMEE-2304 Improved README.
TOMEE-2304 Improved README.
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/28bb6d35
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/28bb6d35
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/28bb6d35
Branch: refs/heads/master
Commit: 28bb6d35641d82003cf0f96c6dd711e15f7269ed
Parents: 59c288b
Author: CesarHernandezGt <cf...@gmail.com>
Authored: Tue Dec 11 23:09:23 2018 -0600
Committer: CesarHernandezGt <cf...@gmail.com>
Committed: Tue Dec 11 23:09:23 2018 -0600
----------------------------------------------------------------------
examples/mp-rest-jwt/README.md | 48 +++++++++++++++++++++++++++++++++----
1 file changed, 44 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/28bb6d35/examples/mp-rest-jwt/README.md
----------------------------------------------------------------------
diff --git a/examples/mp-rest-jwt/README.md b/examples/mp-rest-jwt/README.md
index b4c913f..60a4e62 100644
--- a/examples/mp-rest-jwt/README.md
+++ b/examples/mp-rest-jwt/README.md
@@ -1,5 +1,5 @@
# MP REST JWT
-This is a basic example on how to use MicroProfile JWT in TomEE.
+This is a basic example on how to configure and use MicroProfile JWT in TomEE.
## Run the tests for different scenarios related with JWT validation
@@ -7,7 +7,7 @@ This is a basic example on how to use MicroProfile JWT in TomEE.
## Configuration in TomEE
-The class `MoviesMPJWTConfigurationProvider.java` provide to TomEE figuration for JWT validation.
+The class `MoviesMPJWTConfigurationProvider.java` provides to TomEE the figuration need it for JWT validation.
package org.superbiz.moviefun.rest;
@@ -136,9 +136,49 @@ The test cases from this project are builded using Arquillian. The arquillian co
`src/test/resources/arquillian.xml`
The class `TokenUtils.java` is used during the test to act as an Authorization server who generates `Access Tokens` based
-on the configuration files `privateKey.pem`,`publicKey.pem`,`Token1.json`, and `Token2.json`.
+on the configuration files `privateKey.pem`,`publicKey.pem`,`Token1.json`, and `Token2.json`.
+`nimbus-jose-jwt` is the library used for JWT generation during the tests.
+
+`Token1.json`
+
+ {
+ "iss": "https://server.example.com",
+ "jti": "a-123",
+ "sub": "24400320",
+ "upn": "jdoe@example.com",
+ "preferred_username": "jdoe",
+ "aud": "s6BhdRkqt3",
+ "exp": 1311281970,
+ "iat": 1311280970,
+ "auth_time": 1311280969,
+ "groups": [
+ "group1",
+ "group2",
+ "crud",
+ "read-only"
+ ]
+ }
+
+
+`Token2.json`
+
+ {
+ "iss": "https://server.example.com",
+ "jti": "a-123",
+ "sub": "24400320",
+ "upn": "alice@example.com",
+ "preferred_username": "alice",
+ "aud": "s6BhdRkqt3",
+ "exp": 1311281970,
+ "iat": 1311280970,
+ "auth_time": 1311280969,
+ "groups": [
+ "read-only"
+ ]
+ }
+
+
-`nimbus-jose-jwt` is the library used for JWT generation during the testsĀ”.
## Test Scenarios