Class ClientAuthenticationVerifier<T>
java.lang.Object
com.nimbusds.oauth2.sdk.auth.verifier.ClientAuthenticationVerifier<T>
Client authentication verifier.
Related specifications:
- OAuth 2.0 (RFC 6749)
- OpenID Connect Core 1.0
- JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants (RFC 7523)
- OAuth 2.0 Mutual TLS Client Authentication and Certificate Bound Access Tokens (RFC 8705)
-
Constructor Summary
ConstructorsConstructorDescriptionClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, ClientX509CertificateBindingVerifier<T> certBindingVerifier, Set<Audience> aud) Deprecated.ClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, PKIClientX509CertificateBindingVerifier<T> pkiCertBindingVerifier, Set<Audience> aud) Deprecated.ClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, PKIClientX509CertificateBindingVerifier<T> pkiCertBindingVerifier, Set<Audience> aud, ExpendedJTIChecker<T> expendedJTIChecker, long expMaxAhead) Deprecated.ClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, PKIClientX509CertificateBindingVerifier<T> pkiCertBindingVerifier, Set<Audience> aud, JWTAudienceCheck audCheck) Creates a new client authentication verifier.ClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, PKIClientX509CertificateBindingVerifier<T> pkiCertBindingVerifier, Set<Audience> aud, JWTAudienceCheck audCheck, ExpendedJTIChecker<T> expendedJTIChecker, long expMaxAhead) Creates a new client authentication verifier.ClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, Set<Audience> aud) Deprecated.ClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, Set<Audience> aud, ExpendedJTIChecker<T> expendedJTIChecker) Deprecated.ClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, Set<Audience> aud, JWTAudienceCheck audCheck) Creates a new client authentication verifier without support fortls_client_auth
.ClientAuthenticationVerifier
(ClientCredentialsSelector<T> clientCredentialsSelector, Set<Audience> aud, JWTAudienceCheck audCheck, ExpendedJTIChecker<T> expendedJTIChecker) Creates a new client authentication verifier without support fortls_client_auth
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the client credentials selector.Deprecated.Returns the permitted audience in JWT authentication assertions.Returns the optional expended JWT ID (jti) claim checker to prevent JWT replay.Returns the configured audience check.Returns the client X.509 certificate binding verifier for use intls_client_auth
.void
Verifies a client authentication request.
-
Constructor Details
-
ClientAuthenticationVerifier
@Deprecated public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, ClientX509CertificateBindingVerifier<T> certBindingVerifier, Set<Audience> aud) Deprecated.Use the constructor withPKIClientX509CertificateBindingVerifier
Creates a new client authentication verifier.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.certBindingVerifier
- Optional client X.509 certificate binding verifier fortls_client_auth
,null
if not supported.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider.
-
ClientAuthenticationVerifier
@Deprecated public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, Set<Audience> aud) Deprecated.Creates a new client authentication verifier without support fortls_client_auth
. The audience check islegacy
.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider.
-
ClientAuthenticationVerifier
public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, Set<Audience> aud, JWTAudienceCheck audCheck) Creates a new client authentication verifier without support fortls_client_auth
.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider.
-
ClientAuthenticationVerifier
@Deprecated public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, Set<Audience> aud, ExpendedJTIChecker<T> expendedJTIChecker) Deprecated.Creates a new client authentication verifier without support fortls_client_auth
. The audience check islegacy
.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider.expendedJTIChecker
- Optional expended JWT ID (jti) claim checker to prevent JWT replay,null
if none.
-
ClientAuthenticationVerifier
public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, Set<Audience> aud, JWTAudienceCheck audCheck, ExpendedJTIChecker<T> expendedJTIChecker) Creates a new client authentication verifier without support fortls_client_auth
.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider.expendedJTIChecker
- Optional expended JWT ID (jti) claim checker to prevent JWT replay,null
if none.
-
ClientAuthenticationVerifier
@Deprecated public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, PKIClientX509CertificateBindingVerifier<T> pkiCertBindingVerifier, Set<Audience> aud) Deprecated.Creates a new client authentication verifier. The audience check islegacy
.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.pkiCertBindingVerifier
- Optional client X.509 certificate binding verifier fortls_client_auth
,null
if not supported.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider.
-
ClientAuthenticationVerifier
public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, PKIClientX509CertificateBindingVerifier<T> pkiCertBindingVerifier, Set<Audience> aud, JWTAudienceCheck audCheck) Creates a new client authentication verifier.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.pkiCertBindingVerifier
- Optional client X.509 certificate binding verifier fortls_client_auth
,null
if not supported.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider.
-
ClientAuthenticationVerifier
@Deprecated public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, PKIClientX509CertificateBindingVerifier<T> pkiCertBindingVerifier, Set<Audience> aud, ExpendedJTIChecker<T> expendedJTIChecker, long expMaxAhead) Deprecated.Creates a new client authentication verifier. The audience check islegacy
.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.pkiCertBindingVerifier
- Optional client X.509 certificate binding verifier fortls_client_auth
,null
if not supported.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider.expendedJTIChecker
- Optional expended JWT ID (jti) claim checker to prevent JWT replay,null
if none.expMaxAhead
- The maximum number of seconds the expiration time (exp) claim can be ahead of the current time, if zero or negative this check is disabled.
-
ClientAuthenticationVerifier
public ClientAuthenticationVerifier(ClientCredentialsSelector<T> clientCredentialsSelector, PKIClientX509CertificateBindingVerifier<T> pkiCertBindingVerifier, Set<Audience> aud, JWTAudienceCheck audCheck, ExpendedJTIChecker<T> expendedJTIChecker, long expMaxAhead) Creates a new client authentication verifier.- Parameters:
clientCredentialsSelector
- The client credentials selector. Must not benull
.pkiCertBindingVerifier
- Optional client X.509 certificate binding verifier fortls_client_auth
,null
if not supported.aud
- The permitted audience (aud) claim. Must not be empty ornull
. Should be the identity of the recipient, such as the issuer URI for an OpenID provider. When the audience check isstrict
, the permitted audience must be single-valued.audCheck
- The type of audience (aud) check. Must not benull
.expendedJTIChecker
- Optional expended JWT ID (jti) claim checker to prevent JWT replay,null
if none.expMaxAhead
- The maximum number of seconds the expiration time (exp) claim can be ahead of the current time, if zero or negative this check is disabled.
-
-
Method Details
-
getClientCredentialsSelector
Returns the client credentials selector.- Returns:
- The client credentials selector.
-
getClientX509CertificateBindingVerifier
@Deprecated public ClientX509CertificateBindingVerifier<T> getClientX509CertificateBindingVerifier()Deprecated.Returns the client X.509 certificate binding verifier for use intls_client_auth
.- Returns:
- The client X.509 certificate binding verifier,
null
if not specified.
-
getPKIClientX509CertificateBindingVerifier
Returns the client X.509 certificate binding verifier for use intls_client_auth
.- Returns:
- The client X.509 certificate binding verifier,
null
if not specified.
-
getExpectedAudience
Returns the permitted audience in JWT authentication assertions.- Returns:
- The permitted audience (aud) claim values.
-
getJWTAudienceCheck
Returns the configured audience check.- Returns:
- The type of audience (aud) check.
-
getExpendedJTIChecker
Returns the optional expended JWT ID (jti) claim checker to prevent JWT replay.- Returns:
- The expended JWT ID (jti) claim checker,
null
if none.
-
verify
public void verify(ClientAuthentication clientAuth, Set<Hint> hints, Context<T> context) throws InvalidClientException, com.nimbusds.jose.JOSEException Verifies a client authentication request.- Parameters:
clientAuth
- The client authentication. Must not benull
.hints
- Optional hints to the verifier, empty set ofnull
if none.context
- Additional context to be passed to the client credentials selector. May benull
.- Throws:
InvalidClientException
- If the client authentication is invalid, typically due to bad credentials.com.nimbusds.jose.JOSEException
- If authentication failed due to an internal JOSE / JWT processing exception.
-
PKIClientX509CertificateBindingVerifier