Examples of CarbonSSOSessionManager


Examples of org.wso2.carbon.ui.CarbonSSOSessionManager

     * @param resp Corresponding HttpServletResponse
     */
    private void handleSingleLogoutRequest(HttpServletRequest req, HttpServletResponse resp) {
        String logoutReqStr = decodeHTMLCharacters(req.getParameter(
                SAML2SSOAuthenticatorConstants.HTTP_POST_PARAM_SAML2_AUTH_REQ));
        CarbonSSOSessionManager ssoSessionManager = null;
        XMLObject samlObject = null;

        try {
            ssoSessionManager = SAML2SSOAuthFEDataHolder.getInstance().getCarbonSSOSessionManager();
            samlObject = Util.unmarshall(logoutReqStr);
        } catch (SAML2SSOUIAuthenticatorException e) {
            log.error("Error handling the single logout request", e);
        }

        if (samlObject instanceof LogoutRequest) {
            LogoutRequest logoutRequest = (LogoutRequest) samlObject;
            //  There can be only one session index entry.
            List<SessionIndex> sessionIndexList = logoutRequest.getSessionIndexes();
            if (sessionIndexList.size() > 0) {
                // mark this session as invalid.
                ssoSessionManager.makeSessionInvalid(sessionIndexList.get(0).getSessionIndex());
            }
        }
    }
View Full Code Here

Examples of org.wso2.carbon.ui.CarbonSSOSessionManager

                    configContext, backEndServerURL, cookie, session);
            isAuthenticated = authenticationClient.login(responseStr, username);

            // add an entry to CarbonSSOSessionManager : IdpSessionIndex --> localSessionId
            if (isAuthenticated) {
                CarbonSSOSessionManager ssoSessionManager =
                        SAML2SSOAuthFEDataHolder.getInstance().getCarbonSSOSessionManager();
                ssoSessionManager.addSessionMapping(getSessionIndexFromResponse(samlResponse),
                                                    session.getId());
            }
        } catch (SAML2SSOUIAuthenticatorException e) {
            log.error("Error when authenticating the user : " + username, e);
            throw new AuthenticationException("Error when authenticating the user : " + username, e);
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.