Interface CredentialsSupport

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      @NotNull Map<String,​?> getAttributes​(@NotNull javax.jcr.Credentials credentials)
      Obtains the attributes as present with the specified Credentials.
      @NotNull Set<Class> getCredentialClasses()
      Returns all credentials classes supported by this implementation.
      @Nullable String getUserId​(@NotNull javax.jcr.Credentials credentials)
      Retrieves the user identifier from the specified Credentials.
      boolean setAttributes​(@NotNull javax.jcr.Credentials credentials, @NotNull Map<String,​?> attributes)
      Writes the attributes to the specified Credentials.
    • Method Detail

      • getCredentialClasses

        @NotNull
        @NotNull Set<Class> getCredentialClasses()
        Returns all credentials classes supported by this implementation.
        Returns:
        the supported credentials classes.
      • getUserId

        @Nullable
        @Nullable String getUserId​(@NotNull
                                   @NotNull javax.jcr.Credentials credentials)
        Retrieves the user identifier from the specified Credentials. If the specified credentials are not supported or don't contain any user id information this method will return null.
        Parameters:
        credentials - The credentials as passed to the repository login.
        Returns:
        The user id present in the given Credentials or null.
      • getAttributes

        @NotNull
        @NotNull Map<String,​?> getAttributes​(@NotNull
                                                   @NotNull javax.jcr.Credentials credentials)
        Obtains the attributes as present with the specified Credentials. If the specified credentials are not supported or don't contain any attributes this method will return an empty Map.
        Parameters:
        credentials - The credentials as passed to the repository login.
        Returns:
        The credential attributes or an empty Map.
      • setAttributes

        boolean setAttributes​(@NotNull
                              @NotNull javax.jcr.Credentials credentials,
                              @NotNull
                              @NotNull Map<String,​?> attributes)
        Writes the attributes to the specified Credentials. If the specified credentials are not supported or doesn't allow to write attributes this method will return false.
        Parameters:
        credentials - The credentials as passed to the repository login.
        attributes - The attributes to be written to the given credentials.
        Returns:
        true, if the attributes were set; false otherwise.