com.nimbusds.openid.connect.sdk
Class IDTokenClaimsRequest

java.lang.Object
  extended by com.nimbusds.openid.connect.sdk.ClaimsRequest
      extended by com.nimbusds.openid.connect.sdk.IDTokenClaimsRequest

@Immutable
public class IDTokenClaimsRequest
extends ClaimsRequest

Resolved ID Token claims request. Specifies the claims to return with the ID Token. These are determined from the following:

This class is immutable.

Related specifications:

Version:
$version$ (2013-01-21)
Author:
Vladimir Dzhuvinov

Field Summary
 
Fields inherited from class com.nimbusds.openid.connect.sdk.ClaimsRequest
requestedClaims, requiredClaims
 
Constructor Summary
IDTokenClaimsRequest(ResponseTypeSet rts, net.minidev.json.JSONObject idTokenObject, URL redirectURI, State state)
          Creates a new resolved ID Token claims request.
 
Method Summary
 ACRRequest getRequestedACRs()
          Gets the requested Authentication Context Class References (ACRs) (shorthand method).
 int getRequiredMaxAge()
          Gets the required maximum authentication age (shorthand method).
 Subject getRequiredSubject()
          Gets the required subject (shorthand method).
static Set<String> resolveRequiredClaims(ResponseTypeSet rts)
          Resolves the required ID Token claims.
 
Methods inherited from class com.nimbusds.openid.connect.sdk.ClaimsRequest
getClaimNames, getRequestedClaimsObject, getRequestedEssentialClaims, getRequestedVoluntaryClaims, getRequiredClaims
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDTokenClaimsRequest

public IDTokenClaimsRequest(ResponseTypeSet rts,
                            net.minidev.json.JSONObject idTokenObject,
                            URL redirectURI,
                            State state)
                     throws ResolveException
Creates a new resolved ID Token claims request.

Parameters:
rts - The response type set. Obtained from the response_type authorisation request parameter. Must not be null.
idTokenObject - The id_token JSON object from the optional OpenID request object. Obtained from the decoded request or request_uri authorisation request parameter. null if not specified.
redirectURI - The redirection URI, must not be null.
state - Optional state parameter, null if not specified.
Throws:
ResolveException - If the ID Token claims request couldn't be resolved.
Method Detail

resolveRequiredClaims

public static Set<String> resolveRequiredClaims(ResponseTypeSet rts)
Resolves the required ID Token claims.

Parameters:
rts - The response type set. Obtained from the response_type authorisation request parameter. Must not be null.
Returns:
The names of the resolved required ID Token claims, as a read-only set.

getRequiredSubject

public Subject getRequiredSubject()
                           throws ResolveException
Gets the required subject (shorthand method).

Example claim structure:

 { "sub": {"value":"248289761001"}, ... }
 

Returns:
The required subject, null if not specified.
Throws:
ResolveException - If the required subject couldn't be resolved.

getRequestedACRs

public ACRRequest getRequestedACRs()
                            throws ResolveException
Gets the requested Authentication Context Class References (ACRs) (shorthand method).

Example claim structure:

 { "acr": {"values":["2","http://id.incommon.org/assurance/bronze"]}, ... }
 

Returns:
The requested ACRs, null if not specified.
Throws:
ResolveException - If the required ACRs couldn't be resolved.

getRequiredMaxAge

public int getRequiredMaxAge()
                      throws ResolveException
Gets the required maximum authentication age (shorthand method).

Returns:
The maximum authentication age, in seconds; 0 if not specified.
Throws:
ResolveException


Copyright © 2013 NimbusDS. All Rights Reserved.