Package com.nimbusds.oauth2.sdk.auth
Class TLSClientAuthentication
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.auth.ClientAuthentication
-
- com.nimbusds.oauth2.sdk.auth.TLSClientAuthentication
-
- Direct Known Subclasses:
PKITLSClientAuthentication
,SelfSignedTLSClientAuthentication
public abstract class TLSClientAuthentication extends ClientAuthentication
The base abstract class for mutual TLS client authentication at the Token endpoint.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TLSClientAuthentication(ClientAuthenticationMethod method, ClientID clientID)
Creates a new abstract mutual TLS client authentication.protected
TLSClientAuthentication(ClientAuthenticationMethod method, ClientID clientID, SSLSocketFactory sslSocketFactory)
Creates a new abstract mutual TLS client authentication.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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).SSLSocketFactory
getSSLSocketFactory()
Returns the SSL socket factory to use for an outgoing HTTPS request and to present the client certificate(s).-
Methods inherited from class com.nimbusds.oauth2.sdk.auth.ClientAuthentication
getClientID, getMethod, parse
-
-
-
-
Constructor Detail
-
TLSClientAuthentication
protected TLSClientAuthentication(ClientAuthenticationMethod method, ClientID clientID, SSLSocketFactory sslSocketFactory)
Creates a new abstract mutual TLS client authentication. This constructor is intended for an outgoing token request.- Parameters:
method
- The client authentication method. Must not benull
.clientID
- The client identifier. Must not benull
.sslSocketFactory
- The SSL socket factory to use for the outgoing HTTPS request and to present the client certificate(s),null
to use the default one.
-
TLSClientAuthentication
protected TLSClientAuthentication(ClientAuthenticationMethod method, ClientID clientID)
Creates a new abstract mutual TLS client authentication. This constructor is intended for a received token request.- Parameters:
method
- The client authentication method. Must not benull
.clientID
- The client identifier. Must not benull
.
-
-
Method Detail
-
getSSLSocketFactory
public SSLSocketFactory getSSLSocketFactory()
Returns the SSL socket factory to use for an outgoing HTTPS request and to present the client certificate(s).- Returns:
- The SSL socket factory,
null
to use the default one.
-
applyTo
public void applyTo(HTTPRequest httpRequest)
Description copied from class:ClientAuthentication
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).- Specified by:
applyTo
in classClientAuthentication
- Parameters:
httpRequest
- The HTTP request. Must not benull
.
-
-