@Singleton public class ClientAuthenticator extends Object
Constructor and Description |
---|
ClientAuthenticator(ClientRegistrationStore clientRegistrationStore,
OAuth2AuditLogger auditLogger,
RealmNormaliser realmNormaliser,
ClientCredentialsReader clientCredentialsReader,
ClientAuthenticationFailureFactory failureFactory)
Constructs a new ClientAuthenticatorImpl.
|
Modifier and Type | Method and Description |
---|---|
ClientRegistration |
authenticate(OAuth2Request request,
String endpoint)
Authenticates the client making the OAuth2 request by extracting the client's id and secret from the request
and authenticating against the OAuth2 providers client registrations.
|
@Inject public ClientAuthenticator(ClientRegistrationStore clientRegistrationStore, OAuth2AuditLogger auditLogger, RealmNormaliser realmNormaliser, ClientCredentialsReader clientCredentialsReader, ClientAuthenticationFailureFactory failureFactory)
clientRegistrationStore
- An instance of the ClientRegistrationStore.auditLogger
- An instance of the OAuth2AuditLogger.realmNormaliser
- An instance of the RealmNormaliser.clientCredentialsReader
- An instance of the ClientCredentialsReader.failureFactory
- public ClientRegistration authenticate(OAuth2Request request, String endpoint) throws InvalidClientException, InvalidRequestException, NotFoundException
request
- The OAuth2Request. Must not be null
.endpoint
- The endpoint being authenticated for.InvalidClientException
- If either the request does not contain the client's id or the client fails to be
authenticated.InvalidRequestException
- If the request is missing any required parameters or is otherwise malformed.NotFoundException
- If the realm does not have an OAuth 2.0 provider service.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.