public bool Authenticate() { // Create a new account on the web server. var client = new AuthenticationWebServiceClient("http://localhost/2.0"); var loginResult = client.LoginSteam(SteamId, string.Empty, string.Empty); if (loginResult.MemberAuthenticationResult != MemberAuthenticationResult.Ok) { Console.Error.WriteLine("[TestCommPeer] WS -> Failed to login through the web server."); return(false); } _authToken = loginResult.AuthToken; _member = loginResult.MemberView; // Complete the account, so we can set the user name. var completeResult = client.CompleteAccount(Profile.Cmid, Name, ChannelType.Steam, "en_US", string.Empty); if (completeResult.Result != 1) { Console.Error.WriteLine("[TestCommPeer] WS -> Failed to complete account through the web server."); return(false); } Console.WriteLine("[TestCommPeer] WS -> Login success!"); return(true); }
// Token: 0x06000CA4 RID: 3236 RVA: 0x00055838 File Offset: 0x00053A38 private void DrawOKButton(Rect position) { GUI.enabled = (!this._waitingForWsReturn && !string.IsNullOrEmpty(this._characterName)); if (GUITools.Button(new Rect((position.width - 120f) / 2f, position.height - 42f, 120f, 32f), new GUIContent(LocalizedStrings.OkCaps), BlueStonez.button_green)) { this.HideKeyboard(); string name = this._characterName; if (this._selectedIndex != -1) { name = this._availableNames[this._selectedIndex]; } this._waitingForWsReturn = true; AuthenticationWebServiceClient.CompleteAccount(PlayerDataManager.Cmid, name, ApplicationDataManager.Channel, ApplicationDataManager.CurrentLocale.ToString(), SystemInfo.deviceUniqueIdentifier, delegate(AccountCompletionResultView ev) { this.CompleteAccountCallback(ev, name); }, delegate(Exception ex) { this._waitingForWsReturn = false; this._feedbackMessageColor = Color.red; this._errorMessage = "Webservice error"; }); } GUI.enabled = true; }