Package org.modeshape.jcr.api

Examples of org.modeshape.jcr.api.ServletCredentials


        if (session == null) {
            HttpServletRequest request = (HttpServletRequest)context.get(CallContext.HTTP_SERVLET_REQUEST);
            if (request != null) {
                //try via http authentication
                try {
                    session = jcrRepository(repositoryId).login(new ServletCredentials(request), workspace(repositoryId));
                    sessions.put(repositoryId, session);
                    return session;
                } catch (CmisPermissionDeniedException e) {
                    LOGGER.debug(e, "Cannot authenticate using http authentication");
                }
View Full Code Here


        // If there's no authenticated user, try an anonymous login
        if (request == null || request.getUserPrincipal() == null) {
            return repository.login(workspaceName);
        }

        return repository.login(new ServletCredentials(request), workspaceName);
    }
View Full Code Here

                                          String repositoryName,
                                          String workspaceName,
                                          ExecutionContext repositoryContext,
                                          Map<String, Object> sessionAttributes ) {
        if (credentials instanceof ServletCredentials) {
            ServletCredentials creds = (ServletCredentials)credentials;
            HttpServletRequest request = creds.getRequest();
            if (request != null) {
                return repositoryContext.with(new ServletSecurityContext(request));
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.api.ServletCredentials

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.