Interface AuthenticationProvider

All Superinterfaces:
All Known Implementing Classes:
GoogleTokenProvider, HeaderAtnProvider, HttpBasicAuthProvider, HttpDigestAuthProvider, HttpSignProvider, JwtAuthProvider, JwtProvider, OidcProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AuthenticationProvider extends SecurityProvider
Authentication security provider. Expected to authenticate the request and provide a Subject to the security component, that would be available through SecurityContext.
See Also:
  • Method Details

    • authenticate

      AuthenticationResponse authenticate(ProviderRequest providerRequest)
      Authenticate a request. This may be just resolving headers (tokens) or full authentication (basic auth). Do not throw exception for normal processing (e.g. invalid credentials; you may throw an exception in case of misconfiguration). This method will be invoked for inbound requests ONLY.

      This method must provide either a Principal or a whole Subject either for a user or for service (or both).

      providerRequest - context of this security enforcement/validation
      response that either authenticates the request, fails authentication or abstains from authentication
      See Also: