Package io.micronaut.security.token
Class DefaultRolesFinder
java.lang.Object
io.micronaut.security.token.DefaultRolesFinder
- All Implemented Interfaces:
RolesFinder
Default implementation of
RolesFinder
.- Since:
- 1.1.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionDefaultRolesFinder
(TokenConfiguration tokenConfiguration) Constructs a Roles Parser. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.security.token.RolesFinder
hasAnyRequiredRoles, hasAnyRequiredRoles
-
Constructor Details
-
DefaultRolesFinder
Constructs a Roles Parser.- Parameters:
tokenConfiguration
- General Token Configuration
-
-
Method Details
-
resolveRoles
@NonNull public @NonNull List<String> resolveRoles(@Nullable @Nullable Map<String, Object> attributes) Description copied from interface:RolesFinder
Retrieves the list of roles from the User Attributes.- Specified by:
resolveRoles
in interfaceRolesFinder
- Parameters:
attributes
- User's attributes- Returns:
- The granted roles.
-