Created
May 28, 2016 00:58
-
-
Save IntuitDeveloperRelations/4e24477db8653294e773fc5dcb2ff28e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void CreateAuthorization() | |
{ | |
//Remember these for later. | |
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls11; | |
HttpContext.Current.Session["consumerKey"] = consumerKey; | |
HttpContext.Current.Session["consumerSecret"] = consumerSecret; | |
HttpContext.Current.Session["oauthLink"] = OAUTH_URL; | |
// | |
IOAuthSession session = CreateSession(); | |
IToken requestToken = session.GetRequestToken(); | |
HttpContext.Current.Session["requestToken"] = requestToken; | |
tokenSecret = requestToken.TokenSecret; | |
var authUrl = string.Format("{0}?oauth_token={1}&oauth_callback={2}", AUTHORIZE_URL, requestToken.Token, UriUtility.UrlEncode(oauth_callback_url)); | |
HttpContext.Current.Session["oauthLink"] = authUrl; | |
Response.Redirect(authUrl); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment