Examples of SessionKey


Examples of org.apache.shiro.session.mgt.SessionKey

        }
        return context;
    }

    protected Session resolveContextSession(SubjectContext context) throws InvalidSessionException {
        SessionKey key = getSessionKey(context);
        if (key != null) {
            return getSession(key);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.shiro.session.mgt.SessionKey

        if (SessionManager.class.equals(miDeclaringClass) || NativeSessionManager.class.equals(miDeclaringClass)) {
            sessionManagerMethodInvocation = true;
            //for SessionManager calls, all method calls except the 'start' methods require a SessionKey
            // as the first argument, so just get it from there:
            if (!mi.getMethod().getName().equals("start")) {
                SessionKey key = (SessionKey) mi.getArguments()[0];
                sessionId = key.getSessionId();
            }
        }

        //tried the delegate. Use the injected session id if given
        if (sessionId == null) sessionId = this.sessionId;
View Full Code Here

Examples of org.apache.shiro.session.mgt.SessionKey

        MethodInvocation mi = createMock(MethodInvocation.class);
        Method method = getMethod("getSession", SessionManager.class);
        expect(mi.getMethod()).andReturn(method).anyTimes();

        String dummySessionId = UUID.randomUUID().toString();
        SessionKey sessionKey = new DefaultSessionKey(dummySessionId);
        Object[] args = {sessionKey};
        expect(mi.getArguments()).andReturn(args).anyTimes();

        replay(mi);
View Full Code Here

Examples of org.apache.shiro.session.mgt.SessionKey

        if (!WebUtils.isWeb(context)) {
            return super.createExposedSession(session, context);
        }
        ServletRequest request = WebUtils.getRequest(context);
        ServletResponse response = WebUtils.getResponse(context);
        SessionKey key = new WebSessionKey(session.getId(), request, response);
        return new DelegatingSession(this, key);
    }
View Full Code Here

Examples of org.apache.shiro.session.mgt.SessionKey

            return super.createExposedSession(session, key);
        }

        ServletRequest request = WebUtils.getRequest(key);
        ServletResponse response = WebUtils.getResponse(key);
        SessionKey sessionKey = new WebSessionKey(session.getId(), request, response);
        return new DelegatingSession(this, sessionKey);
    }
View Full Code Here

Examples of org.apache.shiro.session.mgt.SessionKey

        }
        return context;
    }

    protected Session resolveContextSession(SubjectContext context) throws InvalidSessionException {
        SessionKey key = getSessionKey(context);
        if (key != null) {
            return getSession(key);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.shiro.session.mgt.SessionKey

    if (!WebUtils.isWeb(context)) {
      return super.createExposedSession(session, context);
    }
    ServletRequest request = WebUtils.getRequest(context);
    ServletResponse response = WebUtils.getResponse(context);
    SessionKey key = new WebSessionKey(session.getId(), request, response);
    return new DelegatingSession(this, key);
  }
View Full Code Here

Examples of org.apache.shiro.session.mgt.SessionKey

      return super.createExposedSession(session, key);
    }

    ServletRequest request = WebUtils.getRequest(key);
    ServletResponse response = WebUtils.getResponse(key);
    SessionKey sessionKey = new WebSessionKey(session.getId(), request, response);
    return new DelegatingSession(this, sessionKey);
  }
View Full Code Here

Examples of org.opensaml.samlext.samlec.SessionKey

*/
public class SessionKeyMarshaller extends AbstractSAMLObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
        SessionKey key = (SessionKey) samlObject;

        if (key.isSOAP11MustUnderstandXSBoolean() != null) {
            XMLHelper.marshallAttribute(SessionKey.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
                    key.isSOAP11MustUnderstandXSBoolean().toString(), domElement, false);
        }
       
        if (key.getSOAP11Actor() != null) {
            XMLHelper.marshallAttribute(SessionKey.SOAP11_ACTOR_ATTR_NAME,
                    key.getSOAP11Actor(), domElement, false);
        }
       
        if (key.getAlgorithm() != null) {
            domElement.setAttributeNS(null, SessionKey.ALGORITHM_ATTRIB_NAME, key.getAlgorithm());
        }
    }
View Full Code Here

Examples of org.opensaml.samlext.samlec.SessionKey

*/
public class SessionKeyUnmarshaller extends AbstractSAMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
        SessionKey key = (SessionKey) parentObject;

        if (childObject instanceof EncType) {
            key.getEncTypes().add((EncType) childObject);
        } else if (childObject instanceof KeyInfo) {
            key.setKeyInfo((KeyInfo) childObject);
        } else {
            super.processChildElement(parentObject, childObject);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.