com.nimbusds.oauth2.sdk.reg
Class ClientRegistrationRequest

java.lang.Object
  extended by com.nimbusds.oauth2.sdk.ProtectedResourceRequest
      extended by com.nimbusds.oauth2.sdk.reg.ClientRegistrationRequest
All Implemented Interfaces:
Message, Request

@Immutable
public class ClientRegistrationRequest
extends ProtectedResourceRequest

Client registration request. This class is immutable.

Example HTTP request:

 POST /register HTTP/1.1
 Content-Type: application/json
 Accept: application/json
 Authorization: Bearer ey23f2.adfj230.af32-developer321
 Host: server.example.com

 {
  "redirect_uris"              : ["https://client.example.org/callback", 
                                  "https://client.example.org/callback2"]
  "client_name"                : "My Example Client",
  "client_name#ja-Jpan-JP"     : "クライアント名",
  "token_endpoint_auth_method" : "client_secret_basic",
  "scope"                      : "read write dolphin",
  "logo_uri"                   : "https://client.example.org/logo.png",
  "jwks_uri"                   : "https://client.example.org/my_public_keys.jwks"
 }
 

Related specifications:

Author:
Vladimir Dzhuvinov

Constructor Summary
ClientRegistrationRequest(ClientMetadata metadata, BearerAccessToken accessToken)
          Creates a new client registration request.
 
Method Summary
 ClientMetadata getClientMetadata()
          Gets the associated client metadata.
static ClientRegistrationRequest parse(HTTPRequest httpRequest)
          Parses a client registration request from the specified HTTP POST request.
 HTTPRequest toHTTPRequest(URL url)
          Returns the matching HTTP request.
 
Methods inherited from class com.nimbusds.oauth2.sdk.ProtectedResourceRequest
getAccessToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientRegistrationRequest

public ClientRegistrationRequest(ClientMetadata metadata,
                                 BearerAccessToken accessToken)
Creates a new client registration request.

Parameters:
metadata - The client metadata. Must not be null and must specify one or more redirect URIs.
accessToken - An OAuth 2.0 Bearer access token for the request, null if none.
Method Detail

getClientMetadata

public ClientMetadata getClientMetadata()
Gets the associated client metadata.

Returns:
The client metadata.

toHTTPRequest

public HTTPRequest toHTTPRequest(URL url)
Description copied from interface: Request
Returns the matching HTTP request.

Parameters:
url - The URL of the HTTP endpoint for which the request is intended. Must not be null.
Returns:
The HTTP request.

parse

public static ClientRegistrationRequest parse(HTTPRequest httpRequest)
                                       throws ParseException
Parses a client registration request from the specified HTTP POST request.

Parameters:
httpRequest - The HTTP request. Must not be null.
Returns:
The client add (register) request.
Throws:
ParseException - If the HTTP request couldn't be parsed to a client register request.


Copyright © 2013 NimbusDS. All Rights Reserved.