Interface AuthInfo

  • All Known Implementing Classes:
    AuthInfoImpl

    public interface AuthInfo
    AuthInfo instances provide access to information related to authentication and authorization of a given content session. AuthInfo instances are guaranteed to be immutable.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static AuthInfo EMPTY  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      @Nullable java.lang.Object getAttribute​(java.lang.String attributeName)
      Returns the attribute with the given name or null if no attribute with that attributeName exists.
      @NotNull java.lang.String[] getAttributeNames()
      Returns the attribute names associated with this instance.
      @NotNull java.util.Set<java.security.Principal> getPrincipals()
      Returns the set of principals associated with this AuthInfo instance.
      @Nullable java.lang.String getUserID()
      Return the user ID to be exposed on the JCR Session object.
    • Method Detail

      • getUserID

        @Nullable
        @Nullable java.lang.String getUserID()
        Return the user ID to be exposed on the JCR Session object. It refers to the ID of the user associated with the Credentials passed to the repository login.
        Returns:
        the user ID such as exposed on the JCR Session object.
      • getAttributeNames

        @NotNull
        @NotNull java.lang.String[] getAttributeNames()
        Returns the attribute names associated with this instance.
        Returns:
        The attribute names with that instance or an empty array if no attributes are present.
      • getAttribute

        @Nullable
        @Nullable java.lang.Object getAttribute​(java.lang.String attributeName)
        Returns the attribute with the given name or null if no attribute with that attributeName exists.
        Parameters:
        attributeName - The attribute name.
        Returns:
        The attribute or null.
      • getPrincipals

        @NotNull
        @NotNull java.util.Set<java.security.Principal> getPrincipals()
        Returns the set of principals associated with this AuthInfo instance.
        Returns:
        A set of principals.