com.nimbusds.oauth2.sdk.client
Class ClientInformation

java.lang.Object
  extended by com.nimbusds.oauth2.sdk.client.ClientInformation
Direct Known Subclasses:
OIDCClientInformation

@Immutable
public class ClientInformation
extends Object

Client information. Encapsulates the registration and metadata details of an OAuth 2.0 client:

This class is immutable.

Related specifications:

Author:
Vladimir Dzhuvinov

Constructor Summary
ClientInformation(ClientID id, URL registrationURI, BearerAccessToken accessToken, ClientMetadata metadata, Secret secret, Date issueDate)
          Creates a new client information instance.
 
Method Summary
 ClientMetadata getClientMetadata()
          Gets the client metadata.
 ClientID getID()
          Gets the client ID.
 Date getIssueDate()
          Gets the issue date of the client identifier.
 BearerAccessToken getRegistrationAccessToken()
          Gets the registration access token.
 URL getRegistrationURI()
          Gets the URI of the client registration.
 Secret getSecret()
          Gets the client secret.
static ClientInformation parse(net.minidev.json.JSONObject jsonObject)
          Parses a client information instance from the specified JSON object.
 net.minidev.json.JSONObject toJSONObject()
          Returns the JSON object representation of this client information instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientInformation

public ClientInformation(ClientID id,
                         URL registrationURI,
                         BearerAccessToken accessToken,
                         ClientMetadata metadata,
                         Secret secret,
                         Date issueDate)
Creates a new client information instance.

Parameters:
id - The client identifier. Must not be null.
registrationURI - The client registration URI. Must not be null.
accessToken - The client registration access token. Must not be null.
metadata - The client metadata. Must not be null.
secret - The optional client secret, null if not specified.
issueDate - The issue date of the client identifier, null if not specified.
Method Detail

getID

public ClientID getID()
Gets the client ID. Corresponds to the client_id client registration parameter.

Returns:
The client ID, null if not specified.

getRegistrationURI

public URL getRegistrationURI()
Gets the URI of the client registration. Corresponds to the registration_client_uri client registration parameter.

Returns:
The registration URI, null if not specified.

getRegistrationAccessToken

public BearerAccessToken getRegistrationAccessToken()
Gets the registration access token. Corresponds to the registration_access_token client registration parameter.

Returns:
The registration access token, null if not specified.

getClientMetadata

public ClientMetadata getClientMetadata()
Gets the client metadata.

Returns:
The client metadata.

getSecret

public Secret getSecret()
Gets the client secret. Corresponds to the client_secret and client_secret_expires_at client registration parameters.

Returns:
The client secret, null if not specified.

getIssueDate

public Date getIssueDate()
Gets the issue date of the client identifier. Corresponds to the client_id_issued_at client registration parameter.

Returns:
The issue date, null if not specified.

toJSONObject

public net.minidev.json.JSONObject toJSONObject()
Returns the JSON object representation of this client information instance.

Returns:
The JSON object.

parse

public static ClientInformation parse(net.minidev.json.JSONObject jsonObject)
                               throws ParseException
Parses a client information instance from the specified JSON object.

Parameters:
jsonObject - The JSON object to parse. Must not be null.
Returns:
The client information.
Throws:
ParseException - If the JSON object couldn't be parsed to a client information instance.


Copyright © 2013 NimbusDS. All Rights Reserved.