コード例 #1
0
        public static TokenContainer getTokens(string url, string userName, string password)
        {
            TokenContainer       tc           = new TokenContainer();
            MsOnlineClaimsHelper claimsHelper = new MsOnlineClaimsHelper(url, userName, password);
            CookieContainer      cc           = claimsHelper.GetCookieContainer();

            tc.FedAuth = cc.GetCookies(new Uri(url))["FedAuth"].Value;
            tc.RtFa    = cc.GetCookies(new Uri(url))["rtFa"].Value;
            return(tc);
        }
コード例 #2
0
        public TokenContainer Authentication(string url, string userName, string password)
        {
            TokenContainer tokens = DAL.getTokens(url, userName, password);

            return(tokens);
        }