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 = "验证错误" }); }
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 }); }
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 = "验证错误" }; }