Equivalent to {@code login(credentials, workspaceName)} except that the returnedSession instance contains the given extra session attributes in addition to any included in the given Credentials instance. Attribute names from the credentials and the attribute map must not overlap. In case of an overlap implementation may throw an
RepositoryException
.
The attributes are implementation-specific and may affect the behavior of the returned session. Unlike credentials attributes, these separately passed session attributes are guaranteed not to affect the authentication of the client.
An implementation that does not support a particular session attribute is expected to ignore it and not make it available through the returned session. A client that depends on specific behavior defined by a particular attribute can check whether the returned session contains that attribute to verify whether the underlying repository implementation supports that feature.
@param credentials the credentials of the user
@param workspaceName the name of a workspace
@param attributes implementation-specific session attributes
@return a valid session for the user to access the repository
@throws LoginException if authentication or authorization for the specified workspace fails
@throws NoSuchWorkspaceException if the specified workspace is not recognized
@throws RepositoryException if another error occurs