コード例 #1
0
 /// <summary>
 /// Constructor to set LoginRadius access token
 /// </summary>
 /// <param name="httpContextToken">Token for current user</param>
 public LoginRadiusAccessToken(string httpContextToken)
 {
     if (!string.IsNullOrWhiteSpace(httpContextToken))
     {
         var token = _socialEntity.GetAccessToken(httpContextToken);
         access_token = token.Response.access_token;
         expires_in   = token.Response.expires_in;
         IsFetched    = true;
     }
     else
     {
         IsFetched    = false;
         access_token = null;
     }
 }
コード例 #2
0
        public void GetAccessToken(string Token)
        {
            var apiResponse = _social.GetAccessToken(Token);

            if (apiResponse.Response != null && apiResponse != null)
            {
                Session["access_token"] = apiResponse.Response.access_token;
            }

            //Secure accesstoken in session
            //Session["access_token"] = Token;
        }