Package org.apache.polaris.service.auth
Interface Authenticator
- All Known Implementing Classes:
DefaultAuthenticator
public interface Authenticator
An interface for authenticating principals.
Authenticators are used in both internal and external authentication scenarios.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.polaris.core.auth.PolarisPrincipalauthenticate(io.quarkus.security.identity.SecurityIdentity identity) Authenticates the givenSecurityIdentityand returns an authenticatedPolarisPrincipal.
-
Method Details
-
authenticate
org.apache.polaris.core.auth.PolarisPrincipal authenticate(io.quarkus.security.identity.SecurityIdentity identity) throws io.quarkus.security.AuthenticationFailedException Authenticates the givenSecurityIdentityand returns an authenticatedPolarisPrincipal.If the credentials are not valid or if the authentication fails, implementations MUST throw
AuthenticationFailedException, which is mapped to 401 (Unauthorized) HTTP response codes. It is also possible to throw other unchecked exceptions to signal unusual conditions; these will be mapped to the appropriate HTTP response codes.- Parameters:
identity- the identity to authenticate- Returns:
- the authenticated principal
- Throws:
io.quarkus.security.AuthenticationFailedException- if authentication fails
-