internal bool parseJasonDataStructure(JsonDataStrcuture JsonDataStrcuture, string clientSecret)
        {
            access_token = new AccessToken();
            access_token.token = JsonDataStrcuture.AccessToken;
            refresh_token = JsonDataStrcuture.RefreshToken;
            expires_in = JsonDataStrcuture.ExpiresIn;
            //scope needs to be handled

            Dictionary<int, string> keys = new Dictionary<int, string>();
            keys.Add(1, clientSecret);
            try
            {
                id_token = new JsonWebToken(JsonDataStrcuture.AuthenticationToken, keys);
                if (id_token != null)    
                    return true;
                else
                    return false;
            }
            catch (Exception e)
            {
                Console.Write(e);
                return false;
            }
        }
예제 #2
0
 public string findISSByClientIDAndRefreshToken(string client_id, string UserID, string refresh_token)
 {
     string IdPSessionSecret = Nondet.String();
     AccessToken token = new AccessToken();
     token.token = refresh_token;
     IDTokenAndAccessTokenEntry entry = (IDTokenAndAccessTokenEntry)getEntry(token, client_id, UserID);
     Contract.Assume(entry.refresh_token == refresh_token);
     return IdPSessionSecret;
 }