Class DefaultRolesFinder

  • All Implemented Interfaces:
    RolesFinder

    @Singleton
    public class DefaultRolesFinder
    extends java.lang.Object
    implements RolesFinder
    Default implementation of RolesFinder.
    Since:
    1.1.0
    Author:
    Sergio del Amo
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface RolesFinder
        Parameters:
        claims - The claims of the token.
        Returns:
        The granted roles.