GetTokens() public method

public GetTokens ( string code ) : LaunchpadTokens
code string
return LaunchpadTokens
Exemplo n.º 1
0
 public ActionResult LaunchpadCallback(string code)
 {
     if (!string.IsNullOrEmpty(code))
     {
         var reply = oAuthService.GetTokens(code);
         oAuthService.AssignCookies(reply, Response);
         return(RedirectToAction("Chat"));
     }
     return(RedirectToAction("Index"));
 }
Exemplo n.º 2
0
 public ActionResult LaunchpadCallback(string code)
 {
     if (!string.IsNullOrEmpty(code))
     {
         var message = "trying with code " + code + ".\n";
         try
         {
             var reply = oAuthService.GetTokens(code);
             oAuthService.AssignCookies(reply, Response);
             return(RedirectToAction("Chat"));
         }
         catch (Exception ex)
         {
             Log.FatalException("unable to retrieve oauth tokens", ex);
             message        += ex.ToString();
             ViewBag.Message = message;
             return(View("Error"));
         }
     }
     return(RedirectToAction("Index"));
 }