public interface CredentialsProvider
extends java.io.Serializable, javax.naming.Referenceable
login
method of Repository.
JCR allows the Repository login
method to be called without Credentials (login()
and login(String)
) or with null Credentials (login(Credentials)
and login(Credentials, String)
).
The Oracle JCR framework allows a CredentialsProvider to be registered with a Repository. The CredentialsProvider method getCredentials
is called by the JCR framework when no Credentials are supplied to the login
method. The Credentials returned by this method are used to authenticate and create a JCR session, no differently than if Credentials were supplied to login
.
Modifier and Type | Method and Description |
---|---|
Credentials |
getCredentials(Repository repository, java.lang.String workspaceName)
Gets credentials used to create a JCR session when no credentials are supplied to the
login method of Repository. |
Credentials getCredentials(Repository repository, java.lang.String workspaceName) throws java.lang.Exception
login
method of Repository.repository
- the repository; requiredworkspaceName
- the workspace, or null for the "default" workspacejava.lang.Exception
- if the operation fails