Class KeycloakRole

java.lang.Object
org.keycloak.adapters.springsecurity.account.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:
  • Constructor Details

    • KeycloakRole

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

    • getAuthority

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object