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 19:55:49 UTC
tomee git commit: Fix compilation issue
Repository: tomee
Updated Branches:
refs/heads/master 185b74a56 -> 7e372d8ce
Fix compilation issue
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/7e372d8c
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/7e372d8c
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/7e372d8c
Branch: refs/heads/master
Commit: 7e372d8ce4909482aac040b54f901c9c5a823ffc
Parents: 185b74a
Author: Jean-Louis Monteiro <je...@gmail.com>
Authored: Wed Dec 12 20:55:41 2018 +0100
Committer: Jean-Louis Monteiro <je...@gmail.com>
Committed: Wed Dec 12 20:55:41 2018 +0100
----------------------------------------------------------------------
.../moviefun/rest/MoviesMPJWTConfigurationProvider.java | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/7e372d8c/examples/mp-rest-jwt/src/main/java/org/superbiz/moviefun/rest/MoviesMPJWTConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/examples/mp-rest-jwt/src/main/java/org/superbiz/moviefun/rest/MoviesMPJWTConfigurationProvider.java b/examples/mp-rest-jwt/src/main/java/org/superbiz/moviefun/rest/MoviesMPJWTConfigurationProvider.java
index 3bea531..b048584 100644
--- a/examples/mp-rest-jwt/src/main/java/org/superbiz/moviefun/rest/MoviesMPJWTConfigurationProvider.java
+++ b/examples/mp-rest-jwt/src/main/java/org/superbiz/moviefun/rest/MoviesMPJWTConfigurationProvider.java
@@ -33,11 +33,6 @@ public class MoviesMPJWTConfigurationProvider {
@Produces
Optional<JWTAuthContextInfo> getOptionalContextInfo() throws NoSuchAlgorithmException, InvalidKeySpecException {
- JWTAuthContextInfo contextInfo = new JWTAuthContextInfo();
-
- // todo use MP Config to load the configuration
- contextInfo.setIssuedBy("https://server.example.com");
-
final String pemEncoded = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlivFI8qB4D0y2jy0CfEq" +
"Fyy46R0o7S8TKpsx5xbHKoU1VWg6QkQm+ntyIv1p4kE1sPEQO73+HY8+Bzs75XwR" +
"TYL1BmR1w8J5hmjVWjc6R2BTBGAYRPFRhor3kpM6ni2SPmNNhurEAHw7TaqszP5e" +
@@ -51,9 +46,7 @@ public class MoviesMPJWTConfigurationProvider {
final KeyFactory kf = KeyFactory.getInstance("RSA");
final RSAPublicKey pk = (RSAPublicKey) kf.generatePublic(spec);
- contextInfo.setSignerKey(pk);
-
- return Optional.of(contextInfo);
+ return Optional.of(JWTAuthContextInfo.authContextInfo(pk, "https://server.example.com"));
}
@Produces