Class AbstractAuthenticationMapper

java.lang.Object
io.micronaut.security.authentication.AbstractAuthenticationMapper
All Implemented Interfaces:
io.micronaut.core.order.Ordered, AuthenticationMapper

@Internal public abstract class AbstractAuthenticationMapper extends Object implements AuthenticationMapper
Base AuthenticationMapper implementation that maps token claims to an Authentication.
  • Constructor Details

    • AbstractAuthenticationMapper

      protected AbstractAuthenticationMapper(RolesFinder rolesFinder)
      Creates an authentication mapper.
      Parameters:
      rolesFinder - The roles finder used to resolve roles from claims
  • Method Details

    • of

      protected @Nullable Authentication of(@NonNull Claims claims)
      Creates an authentication from claims when a subject claim is present.
      Parameters:
      claims - The token claims
      Returns:
      The authentication, or null if the claims do not contain a subject