public TokenHandleStore(IMongoDatabase db, StoreSettings settings, IClientStore clientStore) : base(db, settings.TokenHandleCollection) { _serializer = new TokenSerializer(clientStore); }
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); }
public RefreshTokenSerializer(IClientStore clientStore) { _tokenSerializer = new TokenSerializer(clientStore); _claimSetSerializer = new ClaimSetSerializer(); }
public RefreshTokenSerializer(IClientStore clientStore) { _tokenSerializer = new TokenSerializer(clientStore); }