JWTAuthentication
, PlainClientSecret
, TLSClientAuthentication
public abstract class ClientAuthentication extends Object
Related specifications:
Modifier | Constructor | Description |
---|---|---|
protected |
ClientAuthentication(ClientAuthenticationMethod method,
ClientID clientID) |
Creates a new abstract client authentication.
|
Modifier and Type | Method | Description |
---|---|---|
abstract 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).
|
ClientID |
getClientID() |
Gets the client identifier.
|
ClientAuthenticationMethod |
getMethod() |
Gets the client authentication method.
|
static ClientAuthentication |
parse(HTTPRequest httpRequest) |
Parses the specified HTTP request for a supported client
authentication (see
ClientAuthenticationMethod ). |
protected ClientAuthentication(ClientAuthenticationMethod method, ClientID clientID)
method
- The client authentication method. Must not be
null
.clientID
- The client identifier. Must not be null
.public ClientAuthenticationMethod getMethod()
public ClientID getClientID()
public static ClientAuthentication parse(HTTPRequest httpRequest) throws ParseException
ClientAuthenticationMethod
). This method
is intended to aid parsing of authenticated
TokenRequest
s.httpRequest
- The HTTP request to parse. Must not be
null
.null
if none or
the method is not supported.ParseException
- If the inferred client authentication
couldn't be parsed.public abstract void applyTo(HTTPRequest httpRequest)
httpRequest
- The HTTP request. Must not be null
.Copyright © 2019 Connect2id Ltd.. All rights reserved.