Package io.micronaut.security.token
Class DefaultRolesFinder
- java.lang.Object
-
- io.micronaut.security.token.DefaultRolesFinder
-
- All Implemented Interfaces:
RolesFinder
@Singleton public class DefaultRolesFinder extends java.lang.Object implements RolesFinder
Default implementation ofRolesFinder
.- Since:
- 1.1.0
- Author:
- Sergio del Amo
-
-
Constructor Summary
Constructors Constructor Description DefaultRolesFinder(TokenConfiguration tokenConfiguration)
Constructs a Roles Parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
findInClaims(Claims claims)
Retrieves the list of roles from the provided claims.
-
-
-
Constructor Detail
-
DefaultRolesFinder
public DefaultRolesFinder(TokenConfiguration tokenConfiguration)
Constructs a Roles Parser.- Parameters:
tokenConfiguration
- General Token Configuration
-
-
Method Detail
-
findInClaims
@Nonnull public java.util.List<java.lang.String> findInClaims(@Nonnull Claims claims)
Description copied from interface:RolesFinder
Retrieves the list of roles from the provided claims.- Specified by:
findInClaims
in interfaceRolesFinder
- Parameters:
claims
- The claims of the token.- Returns:
- The granted roles.
-
-