@DefaultImplementation(value=DefaultRolesFinder.class) public interface RolesFinder
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
findInClaims(Claims claims)
Retrieves the list of roles from the provided claims.
|
default boolean |
hasAnyRequiredRoles(java.util.List<java.lang.String> requiredRoles,
Authentication authentication) |
default boolean |
hasAnyRequiredRoles(java.util.List<java.lang.String> requiredRoles,
Claims claims) |
default boolean |
hasAnyRequiredRoles(java.util.List<java.lang.String> requiredRoles,
java.util.List<java.lang.String> grantedRoles) |
@NonNull java.util.List<java.lang.String> findInClaims(@NonNull Claims claims)
claims
- The claims of the token.default boolean hasAnyRequiredRoles(@NonNull java.util.List<java.lang.String> requiredRoles, @NonNull Authentication authentication)
requiredRoles
- The list of roles required to be authorizedauthentication
- The authenticationdefault boolean hasAnyRequiredRoles(@NonNull java.util.List<java.lang.String> requiredRoles, @NonNull Claims claims)
requiredRoles
- The list of roles required to be authorizedclaims
- The claims of the token.default boolean hasAnyRequiredRoles(@NonNull java.util.List<java.lang.String> requiredRoles, @NonNull java.util.List<java.lang.String> grantedRoles)
requiredRoles
- The list of roles required to be authorizedgrantedRoles
- The list of roles granted to the user