public class SessionProviderImpl extends Object implements SessionProvider
credentials provider
. Additionally,
since Jackrabbit 2.4, if another session provider is available as
the "org.apache.jackrabbit.server.SessionProvider" request attribute,
then that provider is asked first for a session before the default
credential-based login mechanism is used.Constructor and Description |
---|
SessionProviderImpl(CredentialsProvider cp)
Creates a new SessionProvider
|
Modifier and Type | Method and Description |
---|---|
Session |
getSession(javax.servlet.http.HttpServletRequest request,
Repository repository,
String workspace)
Provides the repository session suitable for the given request.
|
void |
releaseSession(Session session)
Informs this provider that the session acquired by a previous
SessionProvider.getSession(javax.servlet.http.HttpServletRequest, javax.jcr.Repository, java.lang.String) call is no longer needed. |
public SessionProviderImpl(CredentialsProvider cp)
cp
- public Session getSession(javax.servlet.http.HttpServletRequest request, Repository repository, String workspace) throws LoginException, RepositoryException, javax.servlet.ServletException
getSession
in interface SessionProvider
repository
- the repository to loginworkspace
- the workspace nameLoginException
- if the credentials are invalidjavax.servlet.ServletException
- if an error occursRepositoryException
public void releaseSession(Session session)
SessionProvider.getSession(javax.servlet.http.HttpServletRequest, javax.jcr.Repository, java.lang.String)
call is no longer needed.releaseSession
in interface SessionProvider
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.