Reputation: 11116
Let's say user logins and gets access_token ( reference ) back with expiry of 2 hours, during this time frame ID4 was restarted. Will the access_token will be valid at this point ?
(I'm not using Entity Framework) but my own 'IResourceOwnerPasswordValidator' implementation.
If yes how and where ? If no do you know how to overcome that by ID4 design ?
Upvotes: 0
Views: 1052
Reputation: 9936
The token is a type of PersistedGrant
that is managed by some implementation of the IPersistedGrantStore
interface. It isn't well-documented, it's only mentioned in the Operational Data section of the Deployment topic, but it's relatively simple. I don't like Entity Framework and fortunately Identity Server persistence is pretty easy to write yourself (I recently blogged about it here), you just have to implement all of the various stores (plus whatever you want to save in terms of the user's account associated with the basic identity details created after login).
Here is the interface definition: IPersistedGrantStore
And this is the data it stores: PersistedGrant
You'll have to register your store as a transient service in Startup.cs
:
services.AddTransient<IPersistedGrantStore, PersistedGrantStore>();
Upvotes: 1