Package in.partake.session

Examples of in.partake.session.OpenIDLoginInformation


        String receivingURL = receivingURL();
        Map<String, Object> params = new HashMap<String, Object>();
        for (Map.Entry<String, String[]> entry : request().queryString().entrySet())
            params.put(entry.getKey(), entry.getValue());

        OpenIDLoginInformation info = (OpenIDLoginInformation) Cache.get(Constants.Cache.OPENID_LOGIN_KEY_PREFIX + sessionId);
        String purpose = info.takeLoginPurpose();
        try {
            if ("login".equals(purpose))
                return verifyOpenIDForLogin(receivingURL, params, info.getDiscoveryInformation());
            if ("connect".equals(purpose))
                return verifyOpenIDForConnection(receivingURL, params, info.getDiscoveryInformation());

            return renderInvalid(UserErrorCode.INVALID_OPENID_PURPOSE);
        } catch (OpenIDException e) {
            return renderError(ServerErrorCode.OPENID_ERROR, e);
        }
View Full Code Here


        if (sessionId == null)
            throw new PartakeException(ServerErrorCode.SESSION_ID_KEY_NOTFOUND);

        IOpenIDService service = PartakeApp.getOpenIDService();
        DiscoveryInformation discoveryInformation = service.discover(identifier);
        OpenIDLoginInformation info = new OpenIDLoginInformation(purpose, discoveryInformation);
        Cache.set(Constants.Cache.OPENID_LOGIN_KEY_PREFIX + sessionId, info, LOGIN_TIMEOUT_SEC);

        String authURL = service.getURLToAuthenticate(discoveryInformation, CALLBACK_URL);
        return renderRedirect(authURL);
    }
View Full Code Here

TOP

Related Classes of in.partake.session.OpenIDLoginInformation

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.