com.nimbusds.openid.connect.sdk
Class OIDCClientRegistrationErrorResponse

java.lang.Object
  extended by com.nimbusds.openid.connect.sdk.OIDCClientRegistrationResponse
      extended by com.nimbusds.openid.connect.sdk.OIDCClientRegistrationErrorResponse
All Implemented Interfaces:
ErrorResponse, Message, Response

@Immutable
public class OIDCClientRegistrationErrorResponse
extends OIDCClientRegistrationResponse
implements ErrorResponse

OpenID Connect client registration error response. This class is immutable.

Standard errors:

Example HTTP response:

 HTTP/1.1 401 Unauthorized
 WWW-Authenticate: Bearer realm="example.com",
                   error="invalid_token",
                   error_description="The access token expired"
 

Related specifications:

Version:
$version$ (2013-02-18)
Author:
Vladimir Dzhuvinov

Constructor Summary
OIDCClientRegistrationErrorResponse(ErrorObject error)
          Creates a new OpenID Connect client registration error response.
 
Method Summary
 ErrorObject getErrorObject()
          Gets the error associated with the error response.
static Set<ErrorObject> getStandardErrors()
          Gets the standard errors for an OpenID Connect client registration error response.
static OIDCClientRegistrationErrorResponse parse(HTTPResponse httpResponse)
          Parses an OpenID Connect client registration error response from the specified HTTP response.
 HTTPResponse toHTTPResponse()
          Returns the HTTP response for this OpenID Connect client registration error response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OIDCClientRegistrationErrorResponse

public OIDCClientRegistrationErrorResponse(ErrorObject error)
Creates a new OpenID Connect client registration error response.

Parameters:
error - The error. Should match one of the standard errors for a client registration error response. Must not be null.
Method Detail

getStandardErrors

public static Set<ErrorObject> getStandardErrors()
Gets the standard errors for an OpenID Connect client registration error response.

Returns:
The standard errors, as a read-only set.

getErrorObject

public ErrorObject getErrorObject()
Description copied from interface: ErrorResponse
Gets the error associated with the error response.

Specified by:
getErrorObject in interface ErrorResponse
Returns:
The error, null if none.

toHTTPResponse

public HTTPResponse toHTTPResponse()
Returns the HTTP response for this OpenID Connect client registration error response.

Example HTTP response:

 HTTP/1.1 401 Unauthorized
 WWW-Authenticate: Bearer realm="example.com",
                   error="invalid_token",
                   error_description="The access token expired"
 

Specified by:
toHTTPResponse in interface Response
Returns:
The HTTP response.

parse

public static OIDCClientRegistrationErrorResponse parse(HTTPResponse httpResponse)
                                                 throws ParseException
Parses an OpenID Connect client registration error response from the specified HTTP response.

Note: The HTTP status code is not checked for matching the error code semantics.

Parameters:
httpResponse - The HTTP response to parse. Its status code must not be 200 (OK). Must not be null.
Throws:
ParseException - If the HTTP response couldn't be parsed to an OpenID Connect client registration error response.


Copyright © 2013 NimbusDS. All Rights Reserved.