Package org.silverpeas.core.jcr.security
Class JCRUserCredentialsProvider
- java.lang.Object
-
- org.silverpeas.core.jcr.security.JCRUserCredentialsProvider
-
public final class JCRUserCredentialsProvider extends Object
Provider of credentials for users in Silverpeas to authenticate themselves amongst the JCR repository used by Silverpeas.- Author:
- mmoquillon
-
-
Field Summary
Fields Modifier and Type Field Description static String
JCR_SYSTEM_ID
Identifier of the JCR system user in Silverpeas.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AuthenticationCredential
getAuthCredentials(javax.jcr.SimpleCredentials credentials)
Gets the authentication credentials required by Silverpeas to authenticate a user from his JCR simple credentials.static javax.jcr.Credentials
getJcrSystemCredentials()
Gets the credentials of the JCR system user in Silverpeas.static javax.jcr.Credentials
getUserCredentials(String token)
Gets the credentials by token of a user in Silverpeas to authenticate him against the JCR.static javax.jcr.Credentials
getUserCredentials(String login, String domainId, String password)
Gets the simple credentials of a user in Silverpeas to authenticate him against the JCR.
-
-
-
Field Detail
-
JCR_SYSTEM_ID
public static final String JCR_SYSTEM_ID
Identifier of the JCR system user in Silverpeas. It should be used to access without any restrictions to the repository.- See Also:
- Constant Field Values
-
-
Method Detail
-
getJcrSystemCredentials
public static javax.jcr.Credentials getJcrSystemCredentials()
Gets the credentials of the JCR system user in Silverpeas.- Returns:
- the simple credentials corresponding to the JCR system user.
-
getUserCredentials
public static javax.jcr.Credentials getUserCredentials(String login, String domainId, String password)
Gets the simple credentials of a user in Silverpeas to authenticate him against the JCR.- Parameters:
login
- the login the user uses to authenticate him usually in Silverpeas.domainId
- the unique identifier of the user domain in which the user belongs.password
- the password the user uses to authenticate him usually in Silverpeas.- Returns:
- the simple credentials corresponding to the given user in Silverpeas.
-
getUserCredentials
public static javax.jcr.Credentials getUserCredentials(String token)
Gets the credentials by token of a user in Silverpeas to authenticate him against the JCR.- Parameters:
token
- the API token of the user to authenticate him.- Returns:
- the token credentials corresponding to the given user in Silverpeas/
-
getAuthCredentials
public static AuthenticationCredential getAuthCredentials(javax.jcr.SimpleCredentials credentials)
Gets the authentication credentials required by Silverpeas to authenticate a user from his JCR simple credentials.- Parameters:
credentials
- a simple credentials of a user in Silverpeas.- Returns:
- an authentication credentials.
-
-