com.nimbusds.oauth2.sdk.auth
Class ClientSecretJWT

java.lang.Object
  extended by com.nimbusds.oauth2.sdk.auth.ClientAuthentication
      extended by com.nimbusds.oauth2.sdk.auth.JWTAuthentication
          extended by com.nimbusds.oauth2.sdk.auth.ClientSecretJWT

@Immutable
public final class ClientSecretJWT
extends JWTAuthentication

Client secret JWT authentication at the Token endpoint. Implements ClientAuthenticationMethod.CLIENT_SECRET_JWT. This class is immutable.

Supported signature JSON Web Algorithms (JWAs) by this implementation:

Related specifications:

Author:
Vladimir Dzhuvinov

Field Summary
 
Fields inherited from class com.nimbusds.oauth2.sdk.auth.JWTAuthentication
CLIENT_ASSERTION_TYPE
 
Constructor Summary
ClientSecretJWT(com.nimbusds.jwt.SignedJWT clientAssertion, ClientID clientID)
          Creates a new client secret JWT authentication.
 
Method Summary
static Set<com.nimbusds.jose.JWSAlgorithm> getSupportedJWAs()
          Gets the set of supported signature JSON Web Algorithms (JWAs) by this implementation of client secret JSON Web Token (JWT) authentication.
static ClientSecretJWT parse(HTTPRequest httpRequest)
          Parses the specified HTTP POST request for a client secret JSON Web Token (JWT) authentication.
static ClientSecretJWT parse(Map<String,String> params)
          Parses the specified parameters map for a client secret JSON Web Token (JWT) authentication.
static ClientSecretJWT parse(String paramsString)
          Parses a client secret JSON Web Token (JWT) authentication from the specified application/x-www-form-urlencoded encoded parameters string.
 
Methods inherited from class com.nimbusds.oauth2.sdk.auth.JWTAuthentication
applyTo, ensureClientAssertionType, getClientAssertion, getClientID, getJWTAuthenticationClaimsSet, parseClientAssertion, parseClientID, toParameters
 
Methods inherited from class com.nimbusds.oauth2.sdk.auth.ClientAuthentication
getMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientSecretJWT

public ClientSecretJWT(com.nimbusds.jwt.SignedJWT clientAssertion,
                       ClientID clientID)
Creates a new client secret JWT authentication.

Parameters:
clientAssertion - The client assertion, corresponding to the client_assertion_parameter, as an HMAC-signed JWT. Must not be null.
clientID - Optional client identifier, corresponding to the client_id parameter. null if not specified.
Method Detail

getSupportedJWAs

public static Set<com.nimbusds.jose.JWSAlgorithm> getSupportedJWAs()
Gets the set of supported signature JSON Web Algorithms (JWAs) by this implementation of client secret JSON Web Token (JWT) authentication.

Returns:
The set of supported JSON Web Algorithms (JWAs).

parse

public static ClientSecretJWT parse(Map<String,String> params)
                             throws ParseException
Parses the specified parameters map for a client secret JSON Web Token (JWT) authentication. Note that the parameters must not be application/x-www-form-urlencoded encoded.

Parameters:
params - The parameters map to parse. The client secret JSON Web Token (JWT) parameters must be keyed under "client_assertion" and "client_assertion_type". The map must not be null.
Returns:
The client secret JSON Web Token (JWT) authentication.
Throws:
ParseException - If the parameters map couldn't be parsed to a client secret JSON Web Token (JWT) authentication.

parse

public static ClientSecretJWT parse(String paramsString)
                             throws ParseException
Parses a client secret JSON Web Token (JWT) authentication from the specified application/x-www-form-urlencoded encoded parameters string.

Parameters:
paramsString - The parameters string to parse. The client secret JSON Web Token (JWT) parameters must be keyed under "client_assertion" and "client_assertion_type". The string must not be null.
Returns:
The client secret JSON Web Token (JWT) authentication.
Throws:
ParseException - If the parameters string couldn't be parsed to a client secret JSON Web Token (JWT) authentication.

parse

public static ClientSecretJWT parse(HTTPRequest httpRequest)
                             throws ParseException
Parses the specified HTTP POST request for a client secret JSON Web Token (JWT) authentication.

Parameters:
httpRequest - The HTTP POST request to parse. Must not be null and must contain a valid application/x-www-form-urlencoded encoded parameters string in the entity body. The client secret JSON Web Token (JWT) parameters must be keyed under "client_assertion" and "client_assertion_type".
Returns:
The client secret JSON Web Token (JWT) authentication.
Throws:
ParseException - If the HTTP request header couldn't be parsed to a client secret JSON Web Token (JWT) authentication.


Copyright © 2013 NimbusDS. All Rights Reserved.