Esempio n. 1
0
        public AuthenticationInfo Do()
        {
            var client = new YggdrasilClient(AuthServer, ClientToken);

            if (client.Authenticate(Email, Password, Token, TwitchEnabled))
            {
                return(new AuthenticationInfo
                {
                    AccessToken = client.AccessToken,
                    UserType = client.AccountType,
                    DisplayName = client.DisplayName,
                    Properties = client.Properties,
                    UUID = client.UUID
                });
            }
            return(new AuthenticationInfo
            {
                Error = "验证错误"
            });
        }
Esempio n. 2
0
        public AuthenticationInfo Do()
        {
            var client     = new YggdrasilClient(AuthServer, ClientToken);
            var LoginError = client.Authenticate(Email, Password, LauncherToken, Token, TwitchEnabled);

            if (LoginError == null)
            {
                return(new AuthenticationInfo
                {
                    AccessToken = client.AccessToken,
                    UserType = client.AccountType,
                    DisplayName = client.DisplayName,
                    Properties = client.Properties,
                    UUID = client.UUID
                });
            }
            return(new AuthenticationInfo
            {
                Error = LoginError.Message
            });
        }
Esempio n. 3
0
 public AuthenticationInfo Do()
 {
     var client = new YggdrasilClient(ClientToken);
     if (client.Authenticate(Email, Password, TwitchEnabled))
     {
         return new AuthenticationInfo
         {
             AccessToken = client.AccessToken,
             UserType = client.AccountType,
             DisplayName = client.DisplayName,
             Properties = client.Properties,
             UUID = client.UUID
         };
     }
     return new AuthenticationInfo
     {
         Error = "验证错误"
     };
 }