com.nimbusds.openid.connect.sdk.op
Class OIDCAuthorizationRequestResolver

java.lang.Object
  extended by com.nimbusds.openid.connect.sdk.op.OIDCAuthorizationRequestResolver

@ThreadSafe
public class OIDCAuthorizationRequestResolver
extends Object

Resolves the final OpenID Connect authorisation request by superseding its parameters with those found in the optional OpenID Connect request object. The request object is encoded as a JSON Web Token (JWT) and can be specified directly (inline) using the request parameter, or by URL using the request_uri parameter.

To process signed (JWS) and optionally encrypted (JWE) request object JWTs a JWT decoder for the expected JWS / JWE algorithms must be provided at construction time.

To fetch OpenID Connect request objects specified by URL a JWT retriever must be provided, otherwise only inlined request objects can be processed.

This class is thread-safe.

Related specifications:

Author:
Vladimir Dzhuvinov

Constructor Summary
OIDCAuthorizationRequestResolver()
          Creates a new minimal OpenID Connect authorisation request resolver without a JWT retriever and a JWT decoder.
OIDCAuthorizationRequestResolver(JWTDecoder jwtDecoder)
          Creates a new OpenID Connect authorisation request resolver without a JWT retriever.
OIDCAuthorizationRequestResolver(JWTDecoder jwtDecoder, ResourceRetriever jwtRetriever)
          Creates a new OpenID Connect request object resolver.
 
Method Summary
 JWTDecoder getJWTDecoder()
          Gets the JWT decoder.
 ResourceRetriever getJWTRetriever()
          Gets the JWT retriever.
static Map<String,String> reformatClaims(com.nimbusds.jwt.ReadOnlyJWTClaimsSet claimsSet)
          Reformats the specified JWT claims set to a java.util.Map<String,String> instance.
 OIDCAuthorizationRequest resolve(OIDCAuthorizationRequest request)
          Resolves the specified OpenID Connect authorisation request by superseding its parameters with those found in the optional OpenID Connect request object (if any).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OIDCAuthorizationRequestResolver

public OIDCAuthorizationRequestResolver()
Creates a new minimal OpenID Connect authorisation request resolver without a JWT retriever and a JWT decoder. This resolver will not be able to process OpenID Connect request objects and will throw a ResolveException if the authorisation request bears one.


OIDCAuthorizationRequestResolver

public OIDCAuthorizationRequestResolver(JWTDecoder jwtDecoder)
Creates a new OpenID Connect authorisation request resolver without a JWT retriever. This resolver will not be able to process OpenID Connect request objects specified by URL.

Parameters:
jwtDecoder - A configured JWT decoder providing JWS validation and optional JWE decryption, null if not specified.

OIDCAuthorizationRequestResolver

public OIDCAuthorizationRequestResolver(JWTDecoder jwtDecoder,
                                        ResourceRetriever jwtRetriever)
Creates a new OpenID Connect request object resolver.

Parameters:
jwtDecoder - A configured JWT decoder providing JWS validation and optional JWE decryption, null if not specified.
jwtRetriever - A configured JWT retriever for OpenID Connect request objects passed by URL, null if not specified.
Method Detail

getJWTDecoder

public JWTDecoder getJWTDecoder()
Gets the JWT decoder.

Returns:
The JWT decoder, null if not specified.

getJWTRetriever

public ResourceRetriever getJWTRetriever()
Gets the JWT retriever.

Returns:
The JWT retriever, null if not specified.

reformatClaims

public static Map<String,String> reformatClaims(com.nimbusds.jwt.ReadOnlyJWTClaimsSet claimsSet)
                                         throws ResolveException
Reformats the specified JWT claims set to a java.util.Map<String,String> instance.

Parameters:
claimsSet - The JWT claims set to reformat. Must not be null.
Returns:
The JWT claims set as an unmodifiable map of string keys / string values.
Throws:
ResolveException - If reformatting of the JWT claims set failed.

resolve

public OIDCAuthorizationRequest resolve(OIDCAuthorizationRequest request)
                                 throws ResolveException
Resolves the specified OpenID Connect authorisation request by superseding its parameters with those found in the optional OpenID Connect request object (if any).

Parameters:
request - The OpenID Connect authorisation request. Must not be null.
Returns:
The resolved authorisation request, or the original unmodified request if no OpenID Connect request object was specified.
Throws:
ResolveException - If the request couldn't be resolved.


Copyright © 2013 NimbusDS. All Rights Reserved.