예제 #1
0
 public string GetUserName(AuthResult authResult)
 {
     string userName = authResult.UserName;
     if (IsEmail(userName))
     {
         return userName;
     }
     else
     {
         return userName + "@" + authResult.Provider;
     }
 }
예제 #2
0
        public string GetEmail(AuthResult authResult)
        {
            string email = "";

            if (IsEmail(authResult.UserName))
            {
                email = authResult.UserName;
            }
            else
            {
                email = "";
                if (authResult.ExtraData != null)
                {
                    var extraData = new Dictionary<string, string>(authResult.ExtraData, StringComparer.OrdinalIgnoreCase);
                    if (extraData.ContainsKey("email"))
                    {
                        email = extraData["email"];
                    }
                }
            }
            return email;
        }
예제 #3
0
 static AuthResult()
 {
     Failed = new AuthResult(false);
 }