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();
     }
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="rublon">Rublon instance.</param>
 public RublonLoginCallback(RublonLogin rublon)
     : base(rublon)
 {
     this.rublon = rublon;
 }
Example #4
0
 public CallbackSSO(RublonLogin rublon)
     : base(rublon)
 {
 }
 // GET: /Callback/LoginSSO
 public void LoginSSO()
 {
     var rublon = new RublonLogin(Globals.SystemToken, Globals.SecretKey);
     var callback = new CallbackSSO(rublon);
     callback.Call();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     var rublon = new RublonLogin(Globals.SystemToken, Globals.SecretKey);
     var callback = new CallbackSSO(rublon);
     callback.Call();
 }