protected List<ServerAccessToken> getJwtAccessTokens(Client client, UserSubject sub) { final Set<String> toRemove = new HashSet<>(); final List<ServerAccessToken> tokens = new ArrayList<>(); for (Iterator<Cache.Entry<String, String>> it = jwtAccessTokenCache.iterator(); it.hasNext();) { Cache.Entry<String, String> entry = it.next(); String jose = entry.getValue(); JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; ServerAccessToken token = JwtTokenUtils.createAccessTokenFromJwt(theConsumer, jose, this, super.getJwtAccessTokenClaimMap()); if (isExpired(token)) { toRemove.add(entry.getKey()); } else if (isTokenMatched(token, client, sub)) { tokens.add(token); } } jwtAccessTokenCache.removeAll(toRemove); return tokens; }
protected List<ServerAccessToken> getJwtAccessTokens(Client client, UserSubject sub) { final Set<String> toRemove = new HashSet<>(); final List<ServerAccessToken> tokens = new ArrayList<>(); for (Iterator<Cache.Entry<String, String>> it = jwtAccessTokenCache.iterator(); it.hasNext();) { Cache.Entry<String, String> entry = it.next(); String jose = entry.getValue(); JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; ServerAccessToken token = JwtTokenUtils.createAccessTokenFromJwt(theConsumer, jose, this, super.getJwtAccessTokenClaimMap()); if (isExpired(token)) { toRemove.add(entry.getKey()); } else if (isTokenMatched(token, client, sub)) { tokens.add(token); } } jwtAccessTokenCache.removeAll(toRemove); return tokens; }
protected ServerAccessToken getJwtAccessToken(String key) { String jose = jwtAccessTokenCache.get(key); ServerAccessToken token = null; if (jose != null) { JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; token = JwtTokenUtils.createAccessTokenFromJwt(theConsumer, jose, this, super.getJwtAccessTokenClaimMap()); if (isExpired(token)) { jwtAccessTokenCache.remove(key); token = null; } } return token; }
protected ServerAccessToken getJwtAccessToken(String key) { String jose = jwtAccessTokenCache.get(key); ServerAccessToken token = null; if (jose != null) { JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; token = JwtTokenUtils.createAccessTokenFromJwt(theConsumer, jose, this, super.getJwtAccessTokenClaimMap()); if (isExpired(token)) { jwtAccessTokenCache.remove(key); token = null; } } return token; }
if (!persistJwtEncoding) { JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; JwtToken token = theConsumer.getJwtToken(authSchemeData); cacheKey = token.getClaims().getTokenId();
if (!persistJwtEncoding) { JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; JwtToken token = theConsumer.getJwtToken(authSchemeData); cacheKey = token.getClaims().getTokenId();
if (!persistJwtEncoding) { try { JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; JwtToken token = theConsumer.getJwtToken(tokenId); tokenId = token.getClaims().getTokenId();
if (!persistJwtEncoding) { try { JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; JwtToken token = theConsumer.getJwtToken(tokenId); tokenId = token.getClaims().getTokenId();