public void Show() { if (this.m_show) { return; } this.m_show = true; WebAuth.ShowWebView(true); }
public void Hide() { if (!this.m_show) { return; } this.m_show = false; WebAuth.ShowWebView(false); }
private static void GoBack() { if (!WebAuth.IsWebLoginActivityReady()) { return; } AndroidJavaObject androidJavaObject = WebAuth.m_androidWebLoginActivity.CallStatic <AndroidJavaObject>("getInstance", new object[0]); androidJavaObject.Call("GoBack", new object[0]); }
private static string GetWebViewLoginCode() { if (!WebAuth.IsWebLoginActivityReady()) { return(string.Empty); } AndroidJavaObject androidJavaObject = WebAuth.m_androidWebLoginActivity.CallStatic <AndroidJavaObject>("getInstance", new object[0]); return(androidJavaObject.Call <string>("GetWebViewLoginCode", new object[0])); }
public WebV2RequestRepo(IWebProxy proxy, IBasicCredentials creds, AuthCodeRequiredDelegate onAuthCodeRequired) { HttpSettings.Proxy = proxy; Authent = new WebAuth(HttpSettings, creds, onAuthCodeRequired); _bannedShards = new Cached <List <ShardInfo> >(old => new List <ShardInfo>(), value => TimeSpan.FromMinutes(2)); _cachedShards = new Cached <Dictionary <ShardType, ShardInfo> >(old => new ShardInfoRequest(HttpSettings, Authent).MakeRequestAsync().Result.ToShardInfo(), value => TimeSpan.FromSeconds(ShardsExpiresInSec)); }
private static void SetRegionSelectVisualState(bool isVisible) { if (!WebAuth.IsWebLoginActivityReady()) { return; } AndroidJavaObject androidJavaObject = WebAuth.m_androidWebLoginActivity.CallStatic <AndroidJavaObject>("getInstance", new object[0]); androidJavaObject.Call("SetRegionSelectVisualState", new object[] { isVisible }); }
public WebAuth.Status GetStatus() { int webViewStatus = WebAuth.GetWebViewStatus(); if (webViewStatus == 6) { Debug.Log("------------ Web View status no instance ------------"); } if (webViewStatus < 0 || webViewStatus >= 7) { return(WebAuth.Status.Error); } return((WebAuth.Status)webViewStatus); }
private static void SetBreakingNews(string localized_title, string body, string gameObjectName) { if (!WebAuth.IsWebLoginActivityReady()) { return; } AndroidJavaObject androidJavaObject = WebAuth.m_androidWebLoginActivity.CallStatic <AndroidJavaObject>("getInstance", new object[0]); androidJavaObject.Call("SetBreakingNews", new object[] { localized_title, body, gameObjectName }); }
public bool RequestAndCheck() { bool ret = false; HttpContext context = WebApplication.CurrentContext; HttpRequest request = context.Request; string invalidateHandle = request.UriArgs["openid.invalidate_handle"]; if (invalidateHandle == null) { var discover = new DiscoverRequest(); discover.Request(context.OverlayNode, DiscoverRequest.Google_Discover_OpenID_Endpoint); var auth = new WebAuth(); var ub = new UriBuilder(context.Request.Uri); lock (sync) { if (!CacheAssociations.ContainsKey(auth.ToStringHandle())) { CacheAssociations.Add(auth.ToStringHandle(), new KeyAssociation(auth.ToStringHandle())); } } var realm = ub.Uri.ToString(); var authReq = new AuthenticationRequest(discover, realm, auth.ToStringHandle(), realm, AppNode); context.Reply.RedirectTo(authReq.UrlRedirectTo()); } else { lock (sync) { ret = CacheAssociations.ContainsKey(invalidateHandle); if (ret) { CacheAssociations.Remove(invalidateHandle); } } } return(ret); }
public async Task <IActionResult> Index([FromQuery(Name = "ReturnUrl")] string returnUrl, string username, string password, ulong guild) { var identity = await WebAuth.Authorize(username, password, guild); if (identity == null) { return(View(new AuthViewModel(DiscordClient.Guilds.ToList(), true))); } await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(identity), new AuthenticationProperties() { ExpiresUtc = DateTimeOffset.UtcNow.AddHours(1), IssuedUtc = DateTimeOffset.UtcNow, RedirectUri = string.IsNullOrEmpty(returnUrl) ? "/" : returnUrl }); return(RedirectToAction("Index", "Admin")); }
public ActionResult LoginOut(string callbackUrl) { string token = System.Web.HttpContext.Current.User.Identity.Name; if (string.IsNullOrEmpty(token)) { token = WebAuth.GetToken(); } if (!string.IsNullOrEmpty(token)) { //clear token } RemoveSessionInCookie(); FormsAuthentication.SignOut(); if (string.IsNullOrEmpty(callbackUrl)) { return(Redirect(nameof(Login))); } else { return(RedirectToAction(nameof(Login), new { callbackUrl = callbackUrl })); } }
private string GetDropboxToken() { string accessToken = Settings.Default.AccessToken; if (string.IsNullOrEmpty(accessToken)) { WebAuth dialog = new WebAuth(ConsumerKey, ConsumerSecret); dialog.ShowDialog(); if (dialog.Result) { accessToken = dialog.Token.access_token; Settings.Default.AccessToken = accessToken; Settings.Default.Uid = dialog.Token.uid; Settings.Default.Save(); } else { MessageBox.Show("Could not authenticate to Dropbox", "Authentication Error", MessageBoxButton.OK, MessageBoxImage.Error); throw new UnauthorizedAccessException("Dropbox authentication failed."); } } return(accessToken); }
public static void DeleteCookies() { WebAuth.ClearWebViewCookies(); }
public static void ClearBrowserCache() { WebAuth.ClearURLCache(); }
protected void UserPressedStartButton(UIEvent e) { WebAuth.ClearLoginData(); base.BackToMode(SceneMgr.Mode.RESET); }
public static void ClearLoginData() { WebAuth.DeleteStoredToken(); WebAuth.DeleteCookies(); WebAuth.ClearBrowserCache(); }
public string GetLoginCode() { Debug.Log("GetLoginCode"); return(WebAuth.GetWebViewLoginCode()); }
private void ClearLogin(UIEvent e) { UnityEngine.Debug.LogWarning("Clear Login Button pressed from the Splash Screen!"); WebAuth.ClearLoginData(); }
public static bool SetStoredToken(string str) { return(WebAuth.SetStoredLoginToken(str)); }
public void Load() { Debug.Log("Load"); WebAuth.LoadWebView(this.m_url, this.m_window.x, this.m_window.y, this.m_window.width, this.m_window.height, Main.uniqueIdentifier, this.m_callbackGameObject); }
public void SetCountryCodeCookie(string countryCode, string domain) { WebAuth.SetWebViewCountryCodeCookie(countryCode, domain); }
public static void DeleteStoredToken() { WebAuth.DeleteStoredLoginToken(); }
public static void UpdateBreakingNews(string title, string body, string gameObjectName) { WebAuth.SetBreakingNews(title, body, gameObjectName); }
public static void UpdateRegionSelectVisualState(bool isVisible) { WebAuth.SetRegionSelectVisualState(isVisible); }
public void Load() { Debug.Log("Load"); WebAuth.LoadWebView(this.m_url, this.m_window.get_x(), this.m_window.get_y(), this.m_window.get_width(), this.m_window.get_height(), Main.uniqueIdentifier, this.m_callbackGameObject); }
public static string GetStoredToken() { return(WebAuth.GetStoredLoginToken()); }
private void AssetsVersionCheckCompleted() { if (!string.IsNullOrEmpty(UpdateManager.Get().GetError()) && UpdateManager.Get().UpdateIsRequired()) { Error.AddFatalLoc("GLUE_PATCHING_ERROR", new object[0]); } else { if (Network.ShouldBeConnectedToAurora()) { BnetPresenceMgr.Get().Initialize(); BnetFriendMgr.Get().Initialize(); BnetChallengeMgr.Get().Initialize(); BnetWhisperMgr.Get().Initialize(); BnetNearbyPlayerMgr.Get().Initialize(); FriendChallengeMgr.Get().OnLoggedIn(); SpectatorManager.Get().Initialize(); if (!Options.Get().GetBool(Option.CONNECT_TO_AURORA)) { Options.Get().SetBool(Option.CONNECT_TO_AURORA, true); } TutorialProgress progress = Options.Get().GetEnum <TutorialProgress>(Option.LOCAL_TUTORIAL_PROGRESS); if (progress > TutorialProgress.NOTHING_COMPLETE) { this.m_waitingForSetProgress = true; ConnectAPI.SetProgress((long)progress); } if (WebAuth.GetIsNewCreatedAccount()) { AdTrackingManager.Get().TrackAccountCreated(); WebAuth.SetIsNewCreatedAccount(false); } } ConnectAPI.RequestAccountLicenses(); ConnectAPI.RequestGameLicenses(); Box.Get().OnLoggedIn(); BaseUI.Get().OnLoggedIn(); InactivePlayerKicker.Get().OnLoggedIn(); HealthyGamingMgr.Get().OnLoggedIn(); DefLoader.Get().Initialize(); CollectionManager.Init(); AdventureProgressMgr.Init(); Tournament.Init(); GameMgr.Get().OnLoggedIn(); if (Network.ShouldBeConnectedToAurora()) { StoreManager.Get().Init(); } Network.TrackClient(Network.TrackLevel.LEVEL_INFO, Network.TrackWhat.TRACK_LOGIN_FINISHED); Network.ResetConnectionFailureCount(); if (Network.ShouldBeConnectedToAurora()) { ConnectAPI.DoLoginUpdate(); } else { this.m_waitingForUpdateLoginComplete = false; } Enum[] args = new Enum[] { PresenceStatus.LOGIN }; PresenceMgr.Get().SetStatus(args); if (SplashScreen.Get() != null) { SplashScreen.Get().StopPatching(); SplashScreen.Get().ShowRatings(); } this.PreloadActors(); if (!Network.ShouldBeConnectedToAurora()) { base.StartCoroutine(this.RegisterScreenWhenReady()); } SceneMgr.Get().LoadShaderPreCompiler(); } }
public void Close() { WebAuth.CloseWebView(); }
public static void GoBackWebPage() { WebAuth.GoBack(); }