Package io.elastic.api
Interface CredentialsVerifier
public interface CredentialsVerifier
Interface to be implemented by components to verify user's
credentials before they are persisted.
Typically a credentials verification is implemented by sending an arbitrary request to the given service and analyse the response. For example if the response's status code is HTTP 401 Unauthorized the verification failed.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
verify
(jakarta.json.JsonObject configuration) Performs the verification credentials in the given configuration.
-
Method Details
-
verify
Performs the verification credentials in the given configuration. The configuration parameter is a JSON object containing either OAuth access token, API key or username/password combination provided by a user during authentication process. These values are to be verified by sending an arbitrary request to the desired service.- Parameters:
configuration
- contains OAuth access token, API key, username/password to be verified- Throws:
InvalidCredentialsException
- if the credentials are invalid
-