public interface SessionSecurityDelegation
Modifier and Type | Method and Description |
---|---|
void |
cleanupSessionDelegates(HstRequestContext requestContext)
cleans up any sessions that are not yet logged out and were created either through
getOrCreateLiveSecurityDelegate(javax.jcr.Credentials, String) ,
or through getOrCreatePreviewSecurityDelegate(javax.jcr.Credentials, String) or through one of the create methods
with autoLogout set to true |
javax.jcr.Session |
createLiveSecurityDelegate(javax.jcr.Credentials delegate,
boolean autoLogout) |
javax.jcr.Session |
createPreviewSecurityDelegate(javax.jcr.Credentials delegate,
boolean autoLogout) |
javax.jcr.Session |
createSecurityDelegate(javax.jcr.Credentials cred1,
javax.jcr.Credentials cred2,
boolean autoLogout,
DomainRuleExtension... domainExtensions) |
javax.jcr.Session |
getDelegatedSession(javax.jcr.Credentials creds) |
javax.jcr.Session |
getOrCreateLiveSecurityDelegate(javax.jcr.Credentials delegate,
String key)
Returns an existing
Session if there is one on the hst request for key . |
javax.jcr.Session |
getOrCreatePreviewSecurityDelegate(javax.jcr.Credentials delegate,
String key)
Returns an existing
Session if there is one on the hst request for key . |
boolean |
sessionSecurityDelegationEnabled() |
void cleanupSessionDelegates(HstRequestContext requestContext)
getOrCreateLiveSecurityDelegate(javax.jcr.Credentials, String)
,
or through getOrCreatePreviewSecurityDelegate(javax.jcr.Credentials, String)
or through one of the create methods
with autoLogout
set to true
requestContext
- boolean sessionSecurityDelegationEnabled()
true
when session security delegation is enabledjavax.jcr.Session getDelegatedSession(javax.jcr.Credentials creds) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
javax.jcr.Session getOrCreateLiveSecurityDelegate(javax.jcr.Credentials delegate, String key) throws javax.jcr.RepositoryException, IllegalStateException
Session
if there is one on the hst request for key
. If there is none, a
Session
delegate will be created, with flag autoLogout
is true
Session
belonging to delegate
and the normal hst live session credentials with the addition of an extra wildcard domain rule hippo:availability = live. The
Session
is automatically logged out at the end of the hst requestjavax.jcr.RepositoryException
IllegalStateException
- if securityDelegationEnabled
is false or in case the created sessions are not of type HippoSession
or when there is not HstRequestContext
availablecreateLiveSecurityDelegate(javax.jcr.Credentials, boolean)
javax.jcr.Session createLiveSecurityDelegate(javax.jcr.Credentials delegate, boolean autoLogout) throws javax.jcr.RepositoryException, IllegalStateException
delegate
- the credentials of the Session
to combine the access with the live sessionautoLogout
- whether the HST should take care of automatically logging out the session at the end of the requestSession
belonging to delegate
and the normal hst live session credentials with the addition of an extra wildcard domain rule hippo:availability = livejavax.jcr.RepositoryException
IllegalStateException
- if securityDelegationEnabled
is false or in case the created sessions are not of type HippoSession
or when autoLogout
is true
but there is not HstRequestContext
availablejavax.jcr.Session getOrCreatePreviewSecurityDelegate(javax.jcr.Credentials delegate, String key) throws javax.jcr.RepositoryException, IllegalStateException
Session
if there is one on the hst request for key
. If there is none, a
Session
delegate will be created, with flag autoLogout
is true
Session
belonging to delegate
and the normal hst live session credentials with the addition of an extra wildcard domain rule hippo:availability = live. The
Session
is automatically logged out at the end of the hst requestjavax.jcr.RepositoryException
IllegalStateException
- if securityDelegationEnabled
is false or in case the created sessions are not of type HippoSession
or when there is not HstRequestContext
availablecreateLiveSecurityDelegate(javax.jcr.Credentials, boolean)
javax.jcr.Session createPreviewSecurityDelegate(javax.jcr.Credentials delegate, boolean autoLogout) throws javax.jcr.RepositoryException, IllegalStateException
delegate
- the credentials of the Session
to combine the access with the preview sessionautoLogout
- whether the HST should take care of automatically logging out the session at the end of the requestSession
belonging to delegate
and the normal hst preview session credentials with the addition of an extra wildcard domain rule hippo:availability = previewjavax.jcr.RepositoryException
IllegalStateException
- if securityDelegationEnabled
is false or in case the created sessions are not of type HippoSession
or when autoLogout
is true
but there is not HstRequestContext
availablejavax.jcr.Session createSecurityDelegate(javax.jcr.Credentials cred1, javax.jcr.Credentials cred2, boolean autoLogout, DomainRuleExtension... domainExtensions) throws javax.jcr.RepositoryException, IllegalStateException
cred1
- credentials for the first Session
cred2
- credentials for the second Session
autoLogout
- whether the HST should take care of automatically logging out the session at the end of the requestdomainExtensions
- optional extra domain rules for the created delegateSession
belonging to cred1
and cred2
with the optional addition of custom domain rules domainExtensions
javax.jcr.RepositoryException
IllegalStateException
- if securityDelegationEnabled
is false or in case the created sessions are not of type HippoSession
or when autoLogout
is true
but there is not HstRequestContext
availableCopyright © 2008–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.