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 JackrabbitSecurityManager
javax.jcr.RepositoryException
JackrabbitSecurityManager.init(Repository, Session)
public void dispose(String workspaceName)
JackrabbitSecurityManager
workspaceName
.dispose
in interface JackrabbitSecurityManager
workspaceName
- Name of the workspace that is being disposed.JackrabbitSecurityManager.dispose(String)
public void close()
JackrabbitSecurityManager
close
in interface JackrabbitSecurityManager
JackrabbitSecurityManager.close()
public AccessManager getAccessManager(javax.jcr.Session session, AMContext amContext) throws javax.jcr.RepositoryException
JackrabbitSecurityManager
AccessManager
for the given session
.getAccessManager
in interface JackrabbitSecurityManager
AccessManager
for the specified session
.javax.jcr.RepositoryException
JackrabbitSecurityManager.getAccessManager(Session,AMContext)
public PrincipalManager getPrincipalManager(javax.jcr.Session session) throws javax.jcr.RepositoryException
JackrabbitSecurityManager
session
.getPrincipalManager
in interface JackrabbitSecurityManager
session
.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
JackrabbitSecurityManager
session
.getUserManager
in interface JackrabbitSecurityManager
session
.javax.jcr.UnsupportedRepositoryOperationException
- If user management is
not supported.javax.jcr.RepositoryException
JackrabbitSecurityManager.getUserManager(Session)
public String getUserID(Subject subject, String workspaceName) throws javax.jcr.RepositoryException
JackrabbitSecurityManager
Session.getUserID()
for
the specified subject.getUserID
in interface JackrabbitSecurityManager
Session.getUserID()
.javax.jcr.RepositoryException
JackrabbitSecurityManager.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 JackrabbitSecurityManager
workspaceName
- 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.