public bool get_token_from_request() {
string authcode = HttpContext.Current.Request.QueryString["code"];
if (authcode != null)
{
auth_code = authcode;
AuthorizationCode code = new AuthorizationCode();
code.client_id = this.client_id;
code.client_secret = this.client_secret;
code.code = this.auth_code;
code.grant_type = "authorization_code";
code.redirect_uri = this.redirect_uri;
auth_result = new AccessToken();
this._auth = new Auth(this);
auth_result = _auth.authenticate(code);
this.setToken(auth_result);
return true;
}
else
{
return false;
}
}