示例#1
0
        public CookieCollection GetAuthorizationCookies(string userName, string password)
        {
            var template      = _soapHandler.GetSamlBodyTemplate(userName, password, _baseUrl);
            var samlResponse  = _authRequestHandler.GetSamlResponse(template);
            var securityToken = _soapHandler.GetSecurityToken(samlResponse);
            var cookies       = _authRequestHandler.GetAuthorizationCookies(securityToken);

            return(cookies);
        }
示例#2
0
        public CookieCollection GetAuthorizationCookies(string userName, string password)
        {
            var template = _soapHandler.GetSamlBodyTemplate(userName, password, _baseUrl);

            template = XMLMinifierFactory.GetInstace.Minify(template);
            var samlResponse = _authRequestHandler.GetSamlResponse(template);

            string templateAuthenticateToOffice365WithFederatedSamlResponse = _soapHandler.GetSamlBodyTemplateAuthenticateWithFederatedSamlResponse(samlResponse);

            templateAuthenticateToOffice365WithFederatedSamlResponse = XMLMinifierFactory.GetInstace.Minify(templateAuthenticateToOffice365WithFederatedSamlResponse);

            samlResponse = _authRequestHandler.GetSamlResponseOffice365WithFedereatedSaml(templateAuthenticateToOffice365WithFederatedSamlResponse);
            var securityToken = _soapHandler.GetSecurityToken(samlResponse);



            var cookies = _authRequestHandler.GetAuthorizationCookies(securityToken);

            return(cookies);
        }