Class AuthInfoImpl

  • All Implemented Interfaces:
    AuthInfo

    public final class AuthInfoImpl
    extends java.lang.Object
    implements AuthInfo
    Default implementation of the AuthInfo interface.
    • Field Summary

      • Fields inherited from interface org.apache.jackrabbit.oak.api.AuthInfo

        EMPTY
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthInfoImpl​(@Nullable java.lang.String userID, @Nullable java.util.Map<java.lang.String,​?> attributes, @Nullable java.lang.Iterable<? extends java.security.Principal> principals)  
      AuthInfoImpl​(@Nullable java.lang.String userID, @Nullable java.util.Map<java.lang.String,​?> attributes, @Nullable java.util.Set<? extends java.security.Principal> principals)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static AuthInfo createFromSubject​(@NotNull javax.security.auth.Subject subject)  
      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.
      java.lang.String getUserID()
      Return the user ID to be exposed on the JCR Session object.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AuthInfoImpl

        public AuthInfoImpl​(@Nullable
                            @Nullable java.lang.String userID,
                            @Nullable
                            @Nullable java.util.Map<java.lang.String,​?> attributes,
                            @Nullable
                            @Nullable java.util.Set<? extends java.security.Principal> principals)
      • AuthInfoImpl

        public AuthInfoImpl​(@Nullable
                            @Nullable java.lang.String userID,
                            @Nullable
                            @Nullable java.util.Map<java.lang.String,​?> attributes,
                            @Nullable
                            @Nullable java.lang.Iterable<? extends java.security.Principal> principals)
    • Method Detail

      • createFromSubject

        public static AuthInfo createFromSubject​(@NotNull
                                                 @NotNull javax.security.auth.Subject subject)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getUserID

        public java.lang.String getUserID()
        Description copied from interface: AuthInfo
        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.
        Specified by:
        getUserID in interface AuthInfo
        Returns:
        the user ID such as exposed on the JCR Session object.
      • getAttributeNames

        @NotNull
        public @NotNull java.lang.String[] getAttributeNames()
        Description copied from interface: AuthInfo
        Returns the attribute names associated with this instance.
        Specified by:
        getAttributeNames in interface AuthInfo
        Returns:
        The attribute names with that instance or an empty array if no attributes are present.
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String attributeName)
        Description copied from interface: AuthInfo
        Returns the attribute with the given name or null if no attribute with that attributeName exists.
        Specified by:
        getAttribute in interface AuthInfo
        Parameters:
        attributeName - The attribute name.
        Returns:
        The attribute or null.
      • getPrincipals

        @NotNull
        public @NotNull java.util.Set<java.security.Principal> getPrincipals()
        Description copied from interface: AuthInfo
        Returns the set of principals associated with this AuthInfo instance.
        Specified by:
        getPrincipals in interface AuthInfo
        Returns:
        A set of principals.