コード例 #1
0
 public TokenHandleStore(IMongoDatabase db,
                         StoreSettings settings,
                         IClientStore clientStore)
     : base(db, settings.TokenHandleCollection)
 {
     _serializer = new TokenSerializer(clientStore);
 }
コード例 #2
0
        static async Task <RefreshToken> Version1(BsonDocument doc, TokenSerializer tokenSerializer, ClaimSetSerializer ignored)
        {
            var       token = new RefreshToken();
            BsonValue at;

            if (doc.TryGetValue("accessToken", out at))
            {
                token.AccessToken = await tokenSerializer.Deserialize(at.AsBsonDocument);
            }
            token.CreationTime = doc.GetValueOrDefault("creationTime", token.CreationTime);
            token.LifeTime     = doc.GetValueOrDefault("lifetime", token.LifeTime);
            token.Version      = doc.GetValueOrDefault("version", token.Version);
            token.Subject      = new ClaimsPrincipal(new ClaimsIdentity());
            return(token);
        }
コード例 #3
0
 public RefreshTokenSerializer(IClientStore clientStore)
 {
     _tokenSerializer    = new TokenSerializer(clientStore);
     _claimSetSerializer = new ClaimSetSerializer();
 }
コード例 #4
0
 public RefreshTokenSerializer(IClientStore clientStore)
 {
     _tokenSerializer = new TokenSerializer(clientStore);
 }