Duende.IdentityServer.Admin
Duende.IdentityServer.Admin copied to clipboard
Incorrect id return after post properties to client in Admin API
Describe the bug
Adding client property through admin API, POST api/Clients/{id}/Properties
https://github.com/skoruba/Duende.IdentityServer.Admin/blob/724a318e80f710d13a457088887b94ace24e7dec/src/Skoruba.Duende.IdentityServer.Admin.Api/Controllers/ClientsController.cs#L174
expected that method return newly added property id, but method always return value id equal 1
To Reproduce
Create client POST api/Clients
then add property to existing client POST api/Clients/{id}/Properties
Explanation
IMHO the method AddClientPropertyAsync
must be return clientProperty.Id
instead of function AutoSaveChangesAsync
result
https://github.com/skoruba/Duende.IdentityServer.Admin/blob/724a318e80f710d13a457088887b94ace24e7dec/src/Skoruba.Duende.IdentityServer.Admin.EntityFramework/Repositories/ClientRepository.cs#L190
like the method AddClientAsync
https://github.com/skoruba/Duende.IdentityServer.Admin/blob/724a318e80f710d13a457088887b94ace24e7dec/src/Skoruba.Duende.IdentityServer.Admin.EntityFramework/Repositories/ClientRepository.cs#L320
The same behavior when add claim to client
Thanks for your work.
Hi this also is an issue with Claims and likely Secrets.
@georgehastingsopusenergy - thank you for letting me know. can you please send a PR?