All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nimbusds.oauth2.sdk.auth.verifier.ClientCredentialsSelector Maven / Gradle / Ivy

Go to download

OAuth 2.0 SDK with OpenID Connection extensions for developing client and server applications.

There is a newer version: 11.21
Show newest version
package com.nimbusds.oauth2.sdk.auth.verifier;


import java.security.PublicKey;
import java.util.List;

import com.nimbusds.jose.JWSHeader;

import com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod;
import com.nimbusds.oauth2.sdk.auth.Secret;
import com.nimbusds.oauth2.sdk.id.ClientID;


/**
 * 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 of client credentials key rotation.
 * Implementations should be tread-safe.
 *
 * 

Selection of {@link com.nimbusds.oauth2.sdk.auth.ClientSecretBasic * client_secret_basic}, {@link com.nimbusds.oauth2.sdk.auth.ClientSecretPost * client_secret_post} and {@link com.nimbusds.oauth2.sdk.auth.ClientSecretJWT * client_secret_jwt} secrets is handled by the {@link #selectClientSecrets} * method. * *

Selection of {@link com.nimbusds.oauth2.sdk.auth.PrivateKeyJWT * private_key_jwt} keys is handled by the {@link #selectPublicKeys} method. * *

The generic {@link Context context object} may be used to return * {@link com.nimbusds.oauth2.sdk.client.ClientMetadata client metadata} or * other information to the caller. */ public interface ClientCredentialsSelector { /** * Selects one or more client secret candidates for * {@link com.nimbusds.oauth2.sdk.auth.ClientSecretBasic client_secret_basic}, * {@link com.nimbusds.oauth2.sdk.auth.ClientSecretPost client_secret_post} and * {@link com.nimbusds.oauth2.sdk.auth.ClientSecretJWT client_secret_jwt} * authentication. * * @param claimedClientID The client identifier (to be verified). Not * {@code null}. * @param authMethod The client authentication method. Not * {@code null}. * @param context Additional context. May be {@code null}. * * @return The selected client secret candidates. If empty or * {@code null} implies an invalid client. */ List selectClientSecrets(final ClientID claimedClientID, final ClientAuthenticationMethod authMethod, final Context context); /** * Selects one or more public key candidates (e.g. RSA or EC) for * {@link com.nimbusds.oauth2.sdk.auth.PrivateKeyJWT private_key_jwt} * authentication. * * @param claimedClientID The client identifier (to be verified). Not * {@code null}. * @param authMethod The client authentication method. Not * {@code null}. * @param jwsHeader The JWS header, which may contain parameters * such as key ID to facilitate the key * selection. Not {@code null}. * @param context Additional context. Not {@code null}. * * @return The selected public key candidates. If empty or {@code null} * implies an invalid client. */ List selectPublicKeys(final ClientID claimedClientID, final ClientAuthenticationMethod authMethod, final JWSHeader jwsHeader, final Context context); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy