public void BeginLoginSSO() { var callbackUrl = Globals.Host + "/Callback/LoginSSO"; var rublon = new RublonLogin(Globals.SystemToken, Globals.SecretKey); var url = rublon.Authorize(callbackUrl); if (!string.IsNullOrEmpty(url)) { WebSecurity.Logout(); Response.Redirect(url); } }
protected void Page_Load(object sender, EventArgs e) { try { var callbackUrl = "http://localhost:53637/Callback/LoginSSO"; var rublon = new RublonLogin(Globals.SystemToken, Globals.SecretKey); var url = rublon.Authorize(callbackUrl); if (!string.IsNullOrEmpty(url)) { FormsAuthentication.SignOut(); Response.Redirect(url); } } catch(Exception) { Response.Clear(); Response.StatusCode = 500; Response.Write("There was an error, please try again later."); Response.End(); } }