- changed status to open
Add IDTokenClaimsSet class
Issue #25
resolved
Extends ClaimsSet, with getters / setters for all std ID token attributes.
Also add the helper method
/**
* Resolves the required ID Token claims.
*
* @param rts The response type set. Obtained from the
* {@code response_type} authorisation request parameter.
* Must not be {@code null}.
*
* @return The names of the resolved required ID Token claims, as a
* read-only set.
*/
public static Set<String> resolveRequiredClaims(final ResponseTypeSet rts) {
Set<String> claims = new HashSet<String>();
claims.add("iss");
claims.add("sub");
claims.add("aud");
claims.add("exp");
claims.add("iat");
// Conditionally required claims
if (rts.impliesImplicitFlow())
claims.add("nonce");
if (rts.impliesImplicitFlow() && rts.contains(ResponseType.TOKEN))
claims.add("at_hash");
if (rts.impliesImplicitFlow() && rts.contains(ResponseType.CODE))
claims.add("c_hash");
return Collections.unmodifiableSet(claims);
}
Comments (2)
-
reporter -
reporter - changed status to resolved
Done in commit 40382d25e0f660d21cc9a7b599d1f7cf477d96d1.
- Log in to comment