Examples of SAMLSSOAuthnReqDTO


Examples of org.wso2.carbon.identity.sso.saml.dto.SAMLSSOAuthnReqDTO

        }
    }

    public SAMLSSOReqValidationResponseDTO process(SAMLSSOReqValidationResponseDTO valiationDTO, String sessionId, String rpSessionId, String authMode)
            throws Exception {
        SAMLSSOAuthnReqDTO authReqDTO = new SAMLSSOAuthnReqDTO();
        authReqDTO.setIssuer(valiationDTO.getIssuer());
        authReqDTO.setAssertionConsumerURL(valiationDTO.getAssertionConsumerURL());
        authReqDTO.setSubject(valiationDTO.getSubject());
        authReqDTO.setId(valiationDTO.getId());
        authReqDTO.setRpSessionId(rpSessionId);
        authReqDTO.setAssertionString(valiationDTO.getAssertionString());

        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());
        }

        SAMLSSOReqValidationResponseDTO responseDTO = new SAMLSSOReqValidationResponseDTO();
        SAMLSSORespDTO respDTO = process(authReqDTO, sessionId, true, authMode);
        responseDTO.setValid(true);
View Full Code Here

Examples of org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOAuthnReqDTO

            httpServletResponse.sendRedirect(getAdminConsoleURL(httpServletRequest) + "sso-saml/notification_page.jsp?" +
                                  SAMLSSOProviderConstants.FE_SESSION_KEY + "=" + errorSessionId);
            return;
        }
        // Create SAMLSSOAuthnReqDTO using a SAMLSSOReqValidationResponseDTO
        SAMLSSOAuthnReqDTO authnReqDTO = new SAMLSSOAuthnReqDTO();
        authnReqDTO.setAssertionConsumerURL(validationResponseDTO.getAssertionConsumerURL());
        authnReqDTO.setId(validationResponseDTO.getId());
        authnReqDTO.setIssuer(validationResponseDTO.getIssuer());
        authnReqDTO.setPassword(password);
        authnReqDTO.setUsername(username);
        authnReqDTO.setSubject(validationResponseDTO.getSubject());
        authnReqDTO.setRpSessionId(validationResponseDTO.getRpSessionId());
        authnReqDTO.setAssertionString(validationResponseDTO.getAssertionString());

        // authenticate the user
        SAMLSSORespDTO authRespDTO = ssoServiceClient.authenticate(authnReqDTO, ssoTokenID);

        if (authRespDTO.getSessionEstablished()) {  // authentication is SUCCESSFUL
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.