Class ResourcePermission

  • public class ResourcePermission
    extends Object
    Represents a permission for a given resource.
    Pedro Igor
    • Method Detail

      • getResource

        public Resource getResource()
        Returns the resource to which this permission applies.
        the resource to which this permission applies
      • getScopes

        public Collection<Scope> getScopes()
        Returns a list of permitted scopes associated with the resource
        a lit of permitted scopes
      • getResourceServer

        public ResourceServer getResourceServer()
        Returns the resource server associated with this permission.
        the resource server
      • getClaims

        public Map<String,​Set<String>> getClaims()
        Returns all permission claims.
      • addClaim

        public boolean addClaim​(String name,
                                String value)

        Adds a permission claim with the given name and a single value.

        If a claim already exists, the value is added to list of values of the existing claim

        name - the name of the claim
        value - the value of the claim
      • removeClaim

        public void removeClaim​(String name)

        Removes a permission claim.

        name - the name of the claim
      • addScope

        public void addScope​(Scope scope)
      • setGranted

        public void setGranted​(boolean granted)
      • isGranted

        public boolean isGranted()