Interface IdentityProvider


public interface IdentityProvider
Delivers security information about given identity that includes name and assigned roles.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns name assigned to the current context, usually refers to the username
    Returns roles assigned to the current context if any
    boolean
    Checks if given role is assigned to current context
  • Method Details

    • getName

      String getName()
      Returns name assigned to the current context, usually refers to the username
      Returns:
      assigned name taken from security context
    • getRoles

      Collection<String> getRoles()
      Returns roles assigned to the current context if any
      Returns:
      Collection of assigned roles or empty one
    • hasRole

      boolean hasRole(String role)
      Checks if given role is assigned to current context
      Parameters:
      role - role to be checked
      Returns:
      true if the role is found otherwise null