com.nimbusds.oauth2.sdk.auth
Class ClientAuthenticationMethod

java.lang.Object
  extended by com.nimbusds.oauth2.sdk.id.Identifier
      extended by com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod
All Implemented Interfaces:
net.minidev.json.JSONAware

@Immutable
public final class ClientAuthenticationMethod
extends Identifier

Client authentication method at the Token endpoint. This class is immutable.

Constants are provided for four client authentication methods:

Use the constructor to define a custom client authentication method.

Related specifications:

Author:
Vladimir Dzhuvinov

Field Summary
static ClientAuthenticationMethod CLIENT_SECRET_BASIC
          Clients that have received a client secret from the authorisation server authenticate with the authorisation server in accordance with section 3.2.1 of OAuth 2.0 using HTTP Basic authentication.
static ClientAuthenticationMethod CLIENT_SECRET_JWT
          Clients that have received a client secret from the authorisation server, create a JWT using an HMAC SHA algorithm, such as HMAC SHA-256.
static ClientAuthenticationMethod CLIENT_SECRET_POST
          Clients that have received a client secret from the authorisation server authenticate with the authorisation server in accordance with section 3.2.1 of OAuth 2.0 by including the client credentials in the request body.
static ClientAuthenticationMethod PRIVATE_KEY_JWT
          Clients that have registered a public key sign a JWT using the RSA algorithm if a RSA key was registered or the ECDSA algorithm if an Elliptic Curve key was registered (see JWA for the algorithm identifiers).
 
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH
 
Constructor Summary
ClientAuthenticationMethod(String value)
          Creates a new client authentication method with the specified value.
 
Method Summary
 boolean equals(Object object)
          Overrides Object.equals().
static ClientAuthenticationMethod getDefault()
          Gets the default client authentication method.
 
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
getValue, hashCode, toJSONString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLIENT_SECRET_BASIC

public static final ClientAuthenticationMethod CLIENT_SECRET_BASIC
Clients that have received a client secret from the authorisation server authenticate with the authorisation server in accordance with section 3.2.1 of OAuth 2.0 using HTTP Basic authentication. This is the default if no method has been registered for the client.


CLIENT_SECRET_POST

public static final ClientAuthenticationMethod CLIENT_SECRET_POST
Clients that have received a client secret from the authorisation server authenticate with the authorisation server in accordance with section 3.2.1 of OAuth 2.0 by including the client credentials in the request body.


CLIENT_SECRET_JWT

public static final ClientAuthenticationMethod CLIENT_SECRET_JWT
Clients that have received a client secret from the authorisation server, create a JWT using an HMAC SHA algorithm, such as HMAC SHA-256. The HMAC (Hash-based Message Authentication Code) is calculated using the value of client secret as the shared key. The client authenticates in accordance with section 2.2 of (JWT) Bearer Token Profiles and OAuth 2.0 Assertion Profile.


PRIVATE_KEY_JWT

public static final ClientAuthenticationMethod PRIVATE_KEY_JWT
Clients that have registered a public key sign a JWT using the RSA algorithm if a RSA key was registered or the ECDSA algorithm if an Elliptic Curve key was registered (see JWA for the algorithm identifiers). The client authenticates in accordance with section 2.2 of (JWT) Bearer Token Profiles and OAuth 2.0 Assertion Profile.

Constructor Detail

ClientAuthenticationMethod

public ClientAuthenticationMethod(String value)
Creates a new client authentication method with the specified value.

Parameters:
value - The authentication method value. Must not be null or empty string.
Method Detail

getDefault

public static ClientAuthenticationMethod getDefault()
Gets the default client authentication method.

Returns:
CLIENT_SECRET_BASIC

equals

public boolean equals(Object object)
Description copied from class: Identifier
Overrides Object.equals().

Specified by:
equals in class Identifier
Parameters:
object - The object to compare to.
Returns:
true if the objects have the same value, otherwise false.


Copyright © 2013 NimbusDS. All Rights Reserved.