Interface SessionSecurityDelegation


  • public interface SessionSecurityDelegation
    Component that has facility methods for creating NON POOLED session (security delegates) that are optionally logged out automatically at the end of the hst request processing
    • Method Detail

      • getDelegatedSession

        javax.jcr.Session getDelegatedSession​(javax.jcr.Credentials creds)
                                       throws javax.jcr.RepositoryException
        Returns:
        A non pooled jcr session which is not automatically logged out and is NOT combined with the credentials of any other session: This is a plane delegated repository login, not a security delegate.
        Throws:
        javax.jcr.RepositoryException
      • createLiveSecurityDelegate

        javax.jcr.Session createLiveSecurityDelegate​(javax.jcr.Credentials delegate,
                                                     boolean autoLogout)
                                              throws javax.jcr.RepositoryException,
                                                     IllegalStateException
        Parameters:
        delegate - the credentials of the Session to combine the access with the live session
        autoLogout - whether the HST should take care of automatically logging out the session at the end of the request
        Returns:
        a security delegated session which combines the access control rules for Session belonging to delegate and the normal hst live session credentials with the addition of an extra wildcard domain rule hippo:availability = live
        Throws:
        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 available
      • createPreviewSecurityDelegate

        javax.jcr.Session createPreviewSecurityDelegate​(javax.jcr.Credentials delegate,
                                                        boolean autoLogout)
                                                 throws javax.jcr.RepositoryException,
                                                        IllegalStateException
        Parameters:
        delegate - the credentials of the Session to combine the access with the preview session
        autoLogout - whether the HST should take care of automatically logging out the session at the end of the request
        Returns:
        a security delegated session which combines the access control rules for Session belonging to delegate and the normal hst preview session credentials with the addition of an extra wildcard domain rule hippo:availability = preview
        Throws:
        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 available
      • createSecurityDelegate

        javax.jcr.Session createSecurityDelegate​(javax.jcr.Credentials cred1,
                                                 javax.jcr.Credentials cred2,
                                                 boolean autoLogout,
                                                 DomainRuleExtension... domainExtensions)
                                          throws javax.jcr.RepositoryException,
                                                 IllegalStateException
        Parameters:
        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 request
        domainExtensions - optional extra domain rules for the created delegate
        Returns:
        a security delegated session which combines the access control rules for Session belonging to cred1 and cred2 with the optional addition of custom domain rules domainExtensions
        Throws:
        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 available