public class SimpleSecurityManager extends Object implements JackrabbitSecurityManager
SimpleSecurityManager: simple implementation ignoring both
configuration entries for 'principalProvider' and for 'workspaceAccessManager'.
The AccessManager is initialized using
AccessManager.init(org.apache.jackrabbit.core.security.AMContext).| Constructor and Description |
|---|
SimpleSecurityManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Disposes this security manager instance and cleans all internal caches.
|
void |
dispose(String workspaceName)
Disposes those parts of this security manager that are related to the
workspace indicated by the given
workspaceName. |
protected AccessControlProvider |
getAccessControlProvider(javax.jcr.Session systemSession,
String workspaceName)
Always returns
null. |
AccessManager |
getAccessManager(javax.jcr.Session session,
AMContext amContext)
Retrieve the
AccessManager for the given session. |
AuthContext |
getAuthContext(javax.jcr.Credentials creds,
Subject subject,
String workspaceName)
Creates an AuthContext for the given
Credentials and
Subject.This includes selection of applicatoin specific LoginModules and initalization with credentials and Session to System-Workspace |
PrincipalManager |
getPrincipalManager(javax.jcr.Session session)
Retrieve the principal manager for the given
session. |
String |
getUserID(Subject subject,
String workspaceName)
Retrieve the id to be displayed upon
Session.getUserID() for
the specified subject. |
UserManager |
getUserManager(javax.jcr.Session session)
Returns the user manager for the specified
session. |
void |
init(javax.jcr.Repository repository,
javax.jcr.Session systemSession) |
protected AccessControlProvider getAccessControlProvider(javax.jcr.Session systemSession, String workspaceName)
null. AccessControlProvider configuration
is ignored with this security manager. Subclasses may overwrite this
lazy behavior that originates from the SimpleAccessManager.systemSession - The system session used to init the security manager.workspaceName - The name of the workspace for which the provider
should be retrieved.null.public void init(javax.jcr.Repository repository,
javax.jcr.Session systemSession)
throws javax.jcr.RepositoryException
init in interface JackrabbitSecurityManagerjavax.jcr.RepositoryExceptionJackrabbitSecurityManager.init(Repository, Session)public void dispose(String workspaceName)
JackrabbitSecurityManagerworkspaceName.dispose in interface JackrabbitSecurityManagerworkspaceName - Name of the workspace that is being disposed.JackrabbitSecurityManager.dispose(String)public void close()
JackrabbitSecurityManagerclose in interface JackrabbitSecurityManagerJackrabbitSecurityManager.close()public AccessManager getAccessManager(javax.jcr.Session session, AMContext amContext) throws javax.jcr.RepositoryException
JackrabbitSecurityManagerAccessManager for the given session.getAccessManager in interface JackrabbitSecurityManagerAccessManager for the specified session.javax.jcr.RepositoryExceptionJackrabbitSecurityManager.getAccessManager(Session,AMContext)public PrincipalManager getPrincipalManager(javax.jcr.Session session) throws javax.jcr.RepositoryException
JackrabbitSecurityManagersession.getPrincipalManager in interface JackrabbitSecurityManagersession.javax.jcr.UnsupportedRepositoryOperationException - If principal management
is not supported.javax.jcr.RepositoryException - if an error occursJackrabbitSecurityManager.getPrincipalManager(Session)public UserManager getUserManager(javax.jcr.Session session) throws javax.jcr.RepositoryException
JackrabbitSecurityManagersession.getUserManager in interface JackrabbitSecurityManagersession.javax.jcr.UnsupportedRepositoryOperationException - If user management is
not supported.javax.jcr.RepositoryExceptionJackrabbitSecurityManager.getUserManager(Session)public String getUserID(Subject subject, String workspaceName) throws javax.jcr.RepositoryException
JackrabbitSecurityManagerSession.getUserID() for
the specified subject.getUserID in interface JackrabbitSecurityManagerSession.getUserID().javax.jcr.RepositoryExceptionJackrabbitSecurityManager.getUserID(javax.security.auth.Subject, String)public AuthContext getAuthContext(javax.jcr.Credentials creds, Subject subject, String workspaceName) throws javax.jcr.RepositoryException
Credentials and
Subject.getAuthContext in interface JackrabbitSecurityManagerworkspaceName - The name of the workspace to login.AuthContext for the given Credentials, Subjectjavax.jcr.RepositoryException - in other exceptional repository statesCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.