Skip to content

How can I defer setting IdentityServers's SigningCredential #184

Discussion options

You must be logged in to vote

AddSigningCredential(cert) ends up in two calls to add services to DI:

builder.Services.AddSingleton<ISigningCredentialStore>(new InMemorySigningCredentialsStore(credential));
builder.Services.AddSingleton<IValidationKeysStore>(new InMemoryValidationKeysStore(new[] { keyInfo }));

If you want to defer loading, you can implement ISigningCredentialStore and IValidationKeysStore in your own classes and register those as singletons.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by sanjeev-saxena-us
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Follow-up Needs follow-up (for Duende use)
2 participants