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.-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAuthenticationMapper(RolesFinder rolesFinder) Creates an authentication mapper. -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable AuthenticationCreates an authentication from claims when a subject claim is present.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AuthenticationMapper
ofMethods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Constructor Details
-
AbstractAuthenticationMapper
Creates an authentication mapper.- Parameters:
rolesFinder- The roles finder used to resolve roles from claims
-
-
Method Details
-
of
Creates an authentication from claims when a subject claim is present.- Parameters:
claims- The token claims- Returns:
- The authentication, or
nullif the claims do not contain a subject
-