Interface ClientCredentialsSelector<T>
-
public interface ClientCredentialsSelector<T>
Selector of client credential candidates for client authentication verification. The select methods should typically return a single candidate, but may also return multiple in case the client rotates its keys.Implementations must be tread-safe.
Selection of
client_secret_basic,client_secret_postandclient_secret_jwtsecrets is handled by theselectClientSecrets(com.nimbusds.oauth2.sdk.id.ClientID, com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod, com.nimbusds.oauth2.sdk.auth.verifier.Context<T>)method.Selection of
private_key_jwtandpub_key_tls_client_authkeys is handled by theselectPublicKeys(com.nimbusds.oauth2.sdk.id.ClientID, com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod, com.nimbusds.jose.JWSHeader, boolean, com.nimbusds.oauth2.sdk.auth.verifier.Context<T>)method.The generic
context objectmay be used to returnclient metadataor other information to the caller.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Secret>selectClientSecrets(ClientID claimedClientID, ClientAuthenticationMethod authMethod, Context<T> context)Selects one or more client secret candidates forclient_secret_basic,client_secret_postandclient_secret_jwtauthentication.List<? extends PublicKey>selectPublicKeys(ClientID claimedClientID, ClientAuthenticationMethod authMethod, com.nimbusds.jose.JWSHeader jwsHeader, boolean forceRefresh, Context<T> context)Selects one or more public key candidates (e.g.
-
-
-
Method Detail
-
selectClientSecrets
List<Secret> selectClientSecrets(ClientID claimedClientID, ClientAuthenticationMethod authMethod, Context<T> context) throws InvalidClientException
Selects one or more client secret candidates forclient_secret_basic,client_secret_postandclient_secret_jwtauthentication.- Parameters:
claimedClientID- The client identifier (to be verified). Notnull.authMethod- The client authentication method. Notnull.context- Additional context. May benull.- Returns:
- The selected client secret candidates, empty list if none.
- Throws:
InvalidClientException- If the client is invalid.
-
selectPublicKeys
List<? extends PublicKey> selectPublicKeys(ClientID claimedClientID, ClientAuthenticationMethod authMethod, com.nimbusds.jose.JWSHeader jwsHeader, boolean forceRefresh, Context<T> context) throws InvalidClientException
Selects one or more public key candidates (e.g. RSA or EC) forprivate_key_jwtandpub_key_tls_client_authauthentication.- Parameters:
claimedClientID- The client identifier (to be verified). Notnull.authMethod- The client authentication method. Notnull.jwsHeader- The JWS header, which may contain parameters such as key ID to facilitate the key selection.nullfor TLS client authentication.forceRefresh-trueto force refresh of the JWK set (for a remote JWK set referenced by URL).context- Additional context. May benull.- Returns:
- The selected public key candidates, empty list if none.
- Throws:
InvalidClientException- If the client is invalid.
-
-