com.nimbusds.openid.connect.sdk
Class OIDCAuthorizationResponseParser

java.lang.Object
  extended by com.nimbusds.openid.connect.sdk.OIDCAuthorizationResponseParser

public class OIDCAuthorizationResponseParser
extends Object

Parser of OpenID Connect authorisation response messages.

Related specifications:

Author:
Vladimir Dzhuvinov

Method Summary
static OIDCAuthorizationResponse parse(HTTPResponse httpResponse)
          Parses an OpenID Connect authorisation success or error response from the specified HTTP response.
static OIDCAuthorizationResponse parse(URL uri)
          Parses an OpenID Connect authorisation success or error response from the specified URI.
static OIDCAuthorizationResponse parse(URL redirectURI, Map<String,String> params)
          Parses an OpenID Connect authorisation success or error response from the specified redirect URI and parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parse

public static OIDCAuthorizationResponse parse(URL redirectURI,
                                              Map<String,String> params)
                                       throws ParseException
Parses an OpenID Connect authorisation success or error response from the specified redirect URI and parameters.

Parameters:
redirectURI - The base redirect URI. Must not be null.
params - The response parameters to parse. Must not be null.
Returns:
The OpenID Connect authorisation success or error response.
Throws:
ParseException - If the parameters couldn't be parsed to an OpenID Connect authorisation success or error response.

parse

public static OIDCAuthorizationResponse parse(URL uri)
                                       throws ParseException
Parses an OpenID Connect authorisation success or error response from the specified URI.

Example URI:

 https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA&state=xyz
 

Parameters:
uri - The URI to parse. Can be absolute or relative, with a fragment or query string containing the authorisation response parameters. Must not be null.
Returns:
The OpenID Connect authorisation success or error response.
Throws:
ParseException - If the redirect URI couldn't be parsed to an OpenID Connect authorisation success or error response.

parse

public static OIDCAuthorizationResponse parse(HTTPResponse httpResponse)
                                       throws ParseException
Parses an OpenID Connect authorisation success or error response from the specified HTTP response.

Example HTTP response:

 HTTP/1.1 302 Found
 Location: https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA&state=xyz
 

Parameters:
httpResponse - The HTTP response to parse. Must not be null.
Returns:
The OpenID Connect authorisation success or error response.
Throws:
ParseException - If the HTTP response couldn't be parsed to an OpenID Connect authorisation success or error response.


Copyright © 2013 NimbusDS. All Rights Reserved.