From 9599642f3a8ce8954281eb0695a7286331ec67e0 Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Tue, 13 Oct 2015 12:13:07 -0400 Subject: [PATCH] upgraded nimbus in uma module` --- .../uma/service/impl/DefaultUmaTokenService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uma-server/src/main/java/org/mitre/uma/service/impl/DefaultUmaTokenService.java b/uma-server/src/main/java/org/mitre/uma/service/impl/DefaultUmaTokenService.java index 9b3a0e6d0..4e2781b9b 100644 --- a/uma-server/src/main/java/org/mitre/uma/service/impl/DefaultUmaTokenService.java +++ b/uma-server/src/main/java/org/mitre/uma/service/impl/DefaultUmaTokenService.java @@ -89,16 +89,16 @@ public class DefaultUmaTokenService implements UmaTokenService { token.setPermissions(Sets.newHashSet(perm)); - JWTClaimsSet claims = new JWTClaimsSet(); + JWTClaimsSet.Builder claims = new JWTClaimsSet.Builder(); - claims.setAudience(Lists.newArrayList(ticket.getPermission().getResourceSet().getId().toString())); - claims.setIssuer(config.getIssuer()); - claims.setJWTID(UUID.randomUUID().toString()); + claims.audience(Lists.newArrayList(ticket.getPermission().getResourceSet().getId().toString())); + claims.issuer(config.getIssuer()); + claims.jwtID(UUID.randomUUID().toString()); if (config.getRqpTokenLifeTime() != null) { Date exp = new Date(System.currentTimeMillis() + config.getRqpTokenLifeTime() * 1000L); - claims.setExpirationTime(exp); + claims.expirationTime(exp); token.setExpiration(exp); } @@ -107,7 +107,7 @@ public class DefaultUmaTokenService implements UmaTokenService { JWSHeader header = new JWSHeader(signingAlgorithm, null, null, null, null, null, null, null, null, null, jwtService.getDefaultSignerKeyId(), null, null); - SignedJWT signed = new SignedJWT(header, claims); + SignedJWT signed = new SignedJWT(header, claims.build()); jwtService.signJwt(signed);