GetTokens() публичный Метод

public GetTokens ( string code ) : LaunchpadTokens
code string
Результат LaunchpadTokens
Пример #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"));
 }
Пример #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"));
 }