IdentityServer / IdentityServer4.Templates

dotnet new templates for IdentityServer4
Apache License 2.0
695 stars 229 forks source link

How can the configuration of the is4inmem template be done in JSON? #79

Closed papauorg closed 4 years ago

papauorg commented 4 years ago

The readme says the following for the tepmlate is4inmem :

dotnet new is4inmem

Adds a basic IdentityServer with UI, test users and sample clients and resources. Shows both in-memory code and JSON configuration.

I can't seem to find where the JSON configuration is done. Based on the description I thought I would find some file that contains the JSON data for clients, ApiResources, TestUsers e.t.c. that is currently done in code via the "Config" and "TestUser" classes. Did I understand that correctly? Can someone point me to where the JSON configuration is used?

Thanks!

leastprivilege commented 4 years ago

While not exhaustive - here's an example

https://github.com/IdentityServer/IdentityServer4/blob/main/src/IdentityServer4/host/appsettings.json

AddInMemoryClients etc have overload that accept configuration sections.

papauorg commented 4 years ago

Ahh, yes, that was what I was looking for. Thanks!

I'm building a small docker image that allows me to develop and test my own application without having to rely on some public IdPs. Would it be ok for you if I publish such an image to the docker hub?

I'd also send a PR your way if you'd like to have it in your repos. I'd actually prefer that so the docker image won't get stale so fast because I won't be able to keep up with the (awesome new) changes you are constantly providing!

Please let me know what you think. Best regards!

leastprivilege commented 4 years ago

Thanks - but we are not interested in maintaining more things ;)

papauorg commented 4 years ago

OK, I understand that :). Are you ok with me publishing it?

leastprivilege commented 4 years ago

Of course