Open gekiss opened 1 year ago
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
Create client POST api/Clients
then add property to existing client POST api/Clients/{id}/Properties
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
AddClientPropertyAsync
clientProperty.Id
AutoSaveChangesAsync
like the method AddClientAsync https://github.com/skoruba/Duende.IdentityServer.Admin/blob/724a318e80f710d13a457088887b94ace24e7dec/src/Skoruba.Duende.IdentityServer.Admin.EntityFramework/Repositories/ClientRepository.cs#L320
AddClientAsync
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?
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 returnclientProperty.Id
instead of functionAutoSaveChangesAsync
result https://github.com/skoruba/Duende.IdentityServer.Admin/blob/724a318e80f710d13a457088887b94ace24e7dec/src/Skoruba.Duende.IdentityServer.Admin.EntityFramework/Repositories/ClientRepository.cs#L190like the method
AddClientAsync
https://github.com/skoruba/Duende.IdentityServer.Admin/blob/724a318e80f710d13a457088887b94ace24e7dec/src/Skoruba.Duende.IdentityServer.Admin.EntityFramework/Repositories/ClientRepository.cs#L320The same behavior when add claim to client
Thanks for your work.