public void AttemptGetTokenInfoWithInvalidAccessToken()
        {
            dynamic tokenInfo = null;
            RetrieveTokenInfoAction action = new RetrieveTokenInfoAction("", this.providerMock.Object);
            action.Execute();
            tokenInfo = action.TokenInfo;

            this.WriteValidationContextRuleResults(action.ValidationContext);
            Assert.IsNull(tokenInfo);
        }
        public void CanGetTokenInfoWithAccessToken()
        {
            var accessToken = RetrieveCurrentAccessToken();
            Assert.IsNotNullOrEmpty(accessToken);

            dynamic tokenInfo = null;
            RetrieveTokenInfoAction action = new RetrieveTokenInfoAction(accessToken, this.providerMock.Object);
            action.Execute();
            tokenInfo = action.TokenInfo;

            this.WriteValidationContextRuleResults(action.ValidationContext);
            Assert.IsNotNull(tokenInfo);
            //Assert.IsNotNullOrEmpty(tokenInfo.issued_to);
            //Assert.IsNotNullOrEmpty(tokenInfo.audience);
            //Assert.IsNotNullOrEmpty(tokenInfo.user_id);
            //Assert.IsNotNullOrEmpty(tokenInfo.scope);
            //Assert.IsNotNullOrEmpty(tokenInfo.expires_in);
            //Assert.IsNotNullOrEmpty(tokenInfo.email);
            //Assert.IsTrue(tokenInfo.verified_email);
            //Assert.IsNotNullOrEmpty(tokenInfo.access_type);

            Console.WriteLine(tokenInfo.ToString());
        }
 /// <summary>
 ///     Gets the token info.
 /// </summary>
 /// <param name="accessToken">The access token.</param>
 /// <returns></returns>
 public override TokenInfo GetTokenInfo(string accessToken)
 {
     TokenInfo tokenInfo = null;
     RetrieveTokenInfoAction action = new RetrieveTokenInfoAction(accessToken, this);
     action.Execute();
     if (action.Result == ActionResult.Success)
     {
         tokenInfo = action.TokenInfo;
     }
     return tokenInfo;
 }