@Immutable public final class ClientSecretPost extends PlainClientSecret
ClientAuthenticationMethod.CLIENT_SECRET_POST.
Related specifications:
| Constructor and Description |
|---|
ClientSecretPost(ClientID clientID,
Secret secret)
Creates a new client secret post authentication.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(HTTPRequest httpRequest)
Applies the authentication to the specified HTTP request by setting
its Authorization header and/or POST entity-body parameters
(according to the implemented client authentication method).
|
static ClientSecretPost |
parse(HTTPRequest httpRequest)
Parses a client secret post authentication from the specified HTTP
POST request.
|
static ClientSecretPost |
parse(java.util.Map<java.lang.String,java.lang.String> params)
Parses a client secret post authentication from the specified
parameters map.
|
static ClientSecretPost |
parse(java.lang.String paramsString)
Parses a client secret post authentication from the specified
application/x-www-form-urlencoded encoded parameters string. |
java.util.Map<java.lang.String,java.lang.String> |
toParameters()
Returns the parameter representation of this client secret post
authentication.
|
getClientSecretgetClientID, getMethodpublic ClientSecretPost(ClientID clientID, Secret secret)
clientID - The client identifier. Must not be null.secret - The client secret. Must not be null.public java.util.Map<java.lang.String,java.lang.String> toParameters()
application/x-www-form-urlencoded encoded.
Parameters map:
"client_id" -> [client-identifier] "client_secret" -> [client-secret]
public void applyTo(HTTPRequest httpRequest)
ClientAuthenticationapplyTo in class ClientAuthenticationhttpRequest - The HTTP request. Must not be null.public static ClientSecretPost parse(java.util.Map<java.lang.String,java.lang.String> params) throws ParseException
application/x-www-form-urlencoded encoded.params - The parameters map to parse. The client secret post
parameters must be keyed under "client_id" and
"client_secret". The map must not be null.ParseException - If the parameters map couldn't be parsed to a
client secret post authentication.public static ClientSecretPost parse(java.lang.String paramsString) throws ParseException
application/x-www-form-urlencoded encoded parameters string.paramsString - The parameters string to parse. The client secret
post parameters must be keyed under "client_id"
and "client_secret". The string must not be
null.ParseException - If the parameters string couldn't be parsed to
a client secret post authentication.public static ClientSecretPost parse(HTTPRequest httpRequest) throws ParseException
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 post parameters must be keyed under
"client_id" and "client_secret".ParseException - If the HTTP request header couldn't be parsed
to a valid client secret post authentication.Copyright © 2016 Connect2id Ltd.. All Rights Reserved.