Class KeycloakRole

  • All Implemented Interfaces:
    Serializable, org.springframework.security.core.GrantedAuthority

    public class KeycloakRole
    extends Object
    implements org.springframework.security.core.GrantedAuthority
    Represents an authority granted to an Authentication by the Keycloak server.
    Version:
    $Revision: 1 $
    Author:
    Scott Rossillo
    See Also:
    Serialized Form
    • Constructor Detail

      • KeycloakRole

        public KeycloakRole​(String role)
        Creates a new granted authority from the given Keycloak role.
        Parameters:
        role - the name of this granted authority
    • Method Detail

      • getAuthority

        public String getAuthority()
        Specified by:
        getAuthority in interface org.springframework.security.core.GrantedAuthority
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object