Package org.keycloak.representations
Class ClaimsRepresentation
java.lang.Object
org.keycloak.representations.ClaimsRepresentation
Claims parameter as described in the OIDC specification https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter
- Author:
- Marek Posolda
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<CLAIM_TYPE>
ClaimsRepresentation.ClaimValue<CLAIM_TYPE>getClaimValue
(String claimName, ClaimsRepresentation.ClaimContext ctx, Class<CLAIM_TYPE> claimType) boolean
isPresent
(String claimName, ClaimsRepresentation.ClaimContext ctx) boolean
isPresentAsNullClaim
(String claimName, ClaimsRepresentation.ClaimContext ctx) void
setIdTokenClaims
(Map<String, ClaimsRepresentation.ClaimValue> idTokenClaims) void
setUserinfoClaims
(Map<String, ClaimsRepresentation.ClaimValue> userinfoClaims)
-
Constructor Details
-
ClaimsRepresentation
public ClaimsRepresentation()
-
-
Method Details
-
getIdTokenClaims
-
setIdTokenClaims
-
getUserinfoClaims
-
setUserinfoClaims
-
isPresent
- Parameters:
claimName
-ctx
- Whether we ask for claim to be presented in idToken or userInfo- Returns:
- true if claim is presented in the claims parameter either as "null" claim (See OIDC specification for definition of null claim) or claim with some value
-
isPresentAsNullClaim
- Parameters:
claimName
-ctx
- Whether we ask for claim to be presented in idToken or userInfo- Returns:
- true if claim is presented in the claims parameter as "null" claim (See OIDC specification for definition of null claim)
-
getClaimValue
public <CLAIM_TYPE> ClaimsRepresentation.ClaimValue<CLAIM_TYPE> getClaimValue(String claimName, ClaimsRepresentation.ClaimContext ctx, Class<CLAIM_TYPE> claimType) - Parameters:
claimName
-ctx
- Whether we ask for claim to be presented in idToken or userInfoclaimType
- claimType class- Returns:
- Claim value
-