Examples of SessionInfoData


Examples of org.wso2.carbon.identity.sso.saml.session.SessionInfoData

                sessionPersistenceManager.persistSession(sessionId, authnReqDTO.getUsername(),
                                                         spDO, authnReqDTO.getRpSessionId());
            }

            if (isAuthencated && authMode.equals(SAMLSSOConstants.AuthnModes.USERNAME_PASSWORD)) {
                SessionInfoData sessionInfo = sessionPersistenceManager.getSessionInfo(sessionId);
                authnReqDTO.setUsername(sessionInfo.getSubject());
                sessionPersistenceManager.persistSession(sessionId, authnReqDTO.getIssuer(),
                        authnReqDTO.getAssertionConsumerURL(), authnReqDTO.getRpSessionId());
            }

            if(isAuthencated && authMode.equals(SAMLSSOConstants.AuthnModes.OPENID)){
View Full Code Here

Examples of org.wso2.carbon.identity.sso.saml.session.SessionInfoData

        if (authMode.equals(SAMLSSOConstants.AuthnModes.USERNAME_PASSWORD)) {
            //Set the username in the SAMLSSOAuthnReqDTO
            SSOSessionPersistenceManager sessionPersistenceManager = SSOSessionPersistenceManager
                    .getPersistenceManager();
            SessionInfoData sessionInfo = sessionPersistenceManager.getSessionInfo(sessionId);
            authReqDTO.setUsername(sessionInfo.getSubject());
        }
        else{
            authReqDTO.setUsername(valiationDTO.getSubject());
        }
View Full Code Here

Examples of org.wso2.carbon.identity.sso.saml.session.SessionInfoData

                }
            }

            //Get the sessions from the SessionPersistenceManager and prepare the logout responses
            SSOSessionPersistenceManager ssoSessionPersistenceManager = SSOSessionPersistenceManager.getPersistenceManager();
            SessionInfoData sessionInfoData = ssoSessionPersistenceManager.getSessionInfo(sessionId);

            if (sessionInfoData == null) {
                String message = "No Established Sessions corresponding to Session Indexes provided.";
                log.error(message);
                return buildErrorResponse(logoutRequest.getID(), SAMLSSOConstants.StatusCodes.REQUESTOR_ERROR,
                        message);
            }
            subject = sessionInfoData.getSubject();
            String issuer = logoutRequest.getIssuer().getValue();
            Map<String, SAMLSSOServiceProviderDO> sessionsList = sessionInfoData.getServiceProviderList();
            SAMLSSOServiceProviderDO logoutReqIssuer = sessionsList.get(issuer);

            // validate the signature, if it is set.
            if(logoutReqIssuer.getCertAlias() != null){
                boolean isSignatureValid = SAMLSSOUtil.validateAssertionSignature(logoutRequest, logoutReqIssuer.getCertAlias(),
                                                       MultitenantUtils.getTenantDomain(subject));
                if (!isSignatureValid) {
                    String message = "The signature contained in the Assertion is not valid.";
                    log.error(message);
                    return buildErrorResponse(logoutRequest.getID(), SAMLSSOConstants.StatusCodes.REQUESTOR_ERROR,
                            message);
                }
            }

            SingleLogoutMessageBuilder logoutMsgBuilder = new SingleLogoutMessageBuilder();
            Map<String, String> rpSessionsList = sessionInfoData.getRPSessionsList();
            SingleLogoutRequestDTO[] singleLogoutReqDTOs = new SingleLogoutRequestDTO[sessionsList.size()-1];
            LogoutRequest logoutReq = logoutMsgBuilder.buildLogoutRequest(subject, sessionId,
                    SAMLSSOConstants.SingleLogoutCodes.LOGOUT_USER);
            String logoutReqString = SAMLSSOUtil.encode(SAMLSSOUtil.marshall(logoutReq));
            int index = 0;
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.