Interface AuthenticationRequest

All Known Implementing Classes:
AnonymousAuthenticationRequest, BaseAuthenticationRequest, CertificateAuthenticationRequest, TokenAuthenticationRequest, TrustedAuthenticationRequest, UsernamePasswordAuthenticationRequest

public interface AuthenticationRequest
Represents a request for an authenticated identity.

Different IdentityProvider implementations will be able to handle different types of request.

This approach of using a marker interface allows for maximum flexibility for the providers, while still allowing for a single API to get an authenticated SecurityIdentity.

Attributes can be used to transport additional context information with the request such as context path, http header or query parameter values. Attributes may also be enriched or verified by a central component before the request arrives at the IdentityProvider.

Note that identity providers can only handle a single request type, and when a request type is registered with the IdentityProviderManager inheritance is not taken into account.
  • Method Details

    • getAttribute

      <T> T getAttribute(String name)
      Gets an attribute from the authentication request.

      These can be arbitrary, and extensions are encouraged to use name spaced attribute names in a similar manner to package names.

      The `quarkus.` namespace is reserved

      Type Parameters:
      T - The type of the attribute
      Parameters:
      name - The attribute name
      Returns:
      The attribute value
    • setAttribute

      void setAttribute(String name, Object value)
      Sets an attribute on the authentication request.

      These can be arbitrary, and extensions are encouraged to use name spaced attribute names in a similar manner to package names.

      The `quarkus.` namespace is reserved

      Parameters:
      name - The attribute name
      value - The attribute value
    • getAttributes

      Map<String,Object> getAttributes()
      Returns:
      All the authentication request attributes. Modifications on the returned map will affect the authentication request attributes.