send game-service JWTs signed with the same private key

This commit is contained in:
Ryan Esch 2018-10-18 14:19:13 -05:00
parent f6d8a70bf8
commit 0fe7dd5709
6 changed files with 9 additions and 9 deletions

View File

@ -78,7 +78,7 @@ public abstract class JwtAuth {
// We'll use this claim to know this is a user token
onwardsClaims.setAudience("client");
onwardsClaims.setIssuer("https://auth-service-libertybikes.mybluemix.net");
onwardsClaims.setIssuer("https://libertybikes.mybluemix.net");
// we set creation time to 24hrs ago, to avoid timezone issues in the
// browser verification of the jwt.
Calendar calendar1 = Calendar.getInstance();

View File

@ -66,7 +66,7 @@ public class GoogleCallback extends JwtAuth {
infoRequest.getHeaders().setContentType(MediaType.APPLICATION_JSON);
String jsonIdentity = infoRequest.execute().parseAsString();
GoogleUser user = jsonb.fromJson(jsonIdentity, GoogleUser.class);
System.out.println("Created user json: " + jsonb.toJson(user));
System.out.println("User logged in: " + jsonb.toJson(user));
Objects.requireNonNull(user.name, "User name was null");
Objects.requireNonNull(user.email, "User email was null");

View File

@ -324,7 +324,7 @@ public class GameRound implements Runnable {
// We'll use this claim to know this is a user token
onwardsClaims.setAudience("client");
onwardsClaims.setIssuer("https://game-service-libertybikes.mybluemix.net");
onwardsClaims.setIssuer("https://libertybikes.mybluemix.net");
// we set creation time to 24hrs ago, to avoid timezone issues in the
// browser verification of the jwt.
Calendar calendar1 = Calendar.getInstance();

View File

@ -20,8 +20,8 @@
<jndiEntry jndiName="round/map" value="-1"/> <!-- Default = -1 (random map) -->
<jndiEntry jndiName="round/autoStartCooldown" value="20"/> <!-- Default = 20(sec) -->
<jndiEntry jndiName="jwtKeyStore" value="${server.config.dir}resources/security/validationKeystore.jks"/>
<jndiEntry jndiName="jwtKeyStorePassword" value="secret2"/>
<jndiEntry jndiName="jwtKeyStoreAlias" value="bike2"/>
<jndiEntry jndiName="jwtKeyStorePassword" value="secret"/>
<jndiEntry jndiName="jwtKeyStoreAlias" value="bike"/>
<applicationManager autoExpand="true"/>
@ -31,11 +31,11 @@
keyStoreRef="validationKeystore"
trustStoreRef="validationKeystore" />
<keyStore id="validationKeystore"
password="secret2"
password="secret"
type="jks"
location="${server.config.dir}resources/security/validationKeystore.jks" />
<keyStore id="defaultKeyStore" password="secret2" />
<keyStore id="defaultKeyStore" password="secret" />
<quickStartSecurity userName="admin" userPassword="admin"/>
<!-- This configuration allows cross-origin HTTP requests, such

View File

@ -25,8 +25,8 @@
<jndiEntry jndiName="jwtKeyStore" value="${server.config.dir}resources/security/validationKeystore.jks"/>
<mpJwt id="myMpJwt"
keyName="bike2"
issuer="https://game-service-libertybikes.mybluemix.net"
keyName="rebike"
issuer="https://libertybikes.mybluemix.net"
audiences="client"/>
<httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="${httpPort}" httpsPort="${httpsPort}" />