Interface AuthorizationIdentity

  • All Known Implementing Classes:
    JaasSecurityRealm.JaasAuthorizationIdentity

    public interface AuthorizationIdentity
    A realm's authorization identity. Objects of this class represent an active identity which may be examined for authorization decisions. Since there is no upper bound in the lifespan of instances of this class, they should not retain references to scarce resources like database connections or file handles.
    Author:
    David M. Lloyd
    • Method Detail

      • getAttributes

        default Attributes getAttributes()
        Get the attributes which pertain to this identity. By default, an empty attribute collection is returned.
        Returns:
        the attributes (must not be null)
      • getRuntimeAttributes

        default Attributes getRuntimeAttributes()
        Get the runtime attributes which pertain to this identity. By default, an empty attribute collection is returned.
        Returns:
        the runtime attributes (must not be null)
      • basicIdentity

        static AuthorizationIdentity basicIdentity​(Attributes attributes)
        Create a basic authorization identity implementation.
        Parameters:
        attributes - the identity attributes
        Returns:
        the authorization identity
      • basicIdentity

        static AuthorizationIdentity basicIdentity​(Supplier<Attributes> attributes,
                                                   String string)
        Create a basic authorization identity implementation.
        Parameters:
        attributes - the identity attributes
        Returns:
        the authorization identity
      • basicIdentity

        static AuthorizationIdentity basicIdentity​(Supplier<Attributes> attributes,
                                                   Supplier<Attributes> runtimeAttributes,
                                                   String string)
        Create a basic authorization identity implementation using the given attributes and runtime attributes.
        Parameters:
        attributes - the attributes
        runtimeAttributes - the runtime attributes
        Returns:
        the authorization identity
      • basicIdentity

        static AuthorizationIdentity basicIdentity​(AuthorizationIdentity authorizationIdentity,
                                                   Attributes runtimeAttributes)
        Create a basic authorization identity implementation using the given authorization identity and runtime attributes.
        Parameters:
        authorizationIdentity - the authorization identity
        runtimeAttributes - the identity runtime attributes
        Returns:
        the authorization identity