Identityserver4.admin: Make it easier to extend

Created on 26 Feb 2019  路  6Comments  路  Source: skoruba/IdentityServer4.Admin

Currently the library relies on a set of repositories that are not easy to extend: the repository classes don't have virtual methods and they have private members instead of protected ones, and some data come from public static classes like ClientConst.
That makes it very difficult to extend the functionalities: for example, I wanted to add SAML 2.0 to the supported Protocol Types in my application, and I had to implement again IClientRepository, copying the whole implementation of ClientRepository and replacing just the GetProtocolTypes() method with one that instead of calling the static ClientConsts.GetProtocolTypes() returns the two protocol types I need.

task

Most helpful comment

The same goes for using custom data stores. You expect the custom AdminDbContext to inherit from IdentityDbContext but why? Even Asp.Net Core Identity supports custom data stores that doesn鈥檛 inherit from that base class. Identity Server 4 doesn鈥檛 have such requirement either. Would you consider implementing ability to support custom data stores instead of requiring to have it inherit from IdentityDbContext?

Edit: I just read the issue https://github.com/skoruba/IdentityServer4.Admin/issues/169 and seems you are already aware of the issues. Cheers and thanks for your work.

All 6 comments

@aiscrim - Good point, I agree with you - I will change it.
Thank you 馃憤

@aiscrim - Done on dev branch.
Thanks

The same goes for using custom data stores. You expect the custom AdminDbContext to inherit from IdentityDbContext but why? Even Asp.Net Core Identity supports custom data stores that doesn鈥檛 inherit from that base class. Identity Server 4 doesn鈥檛 have such requirement either. Would you consider implementing ability to support custom data stores instead of requiring to have it inherit from IdentityDbContext?

Edit: I just read the issue https://github.com/skoruba/IdentityServer4.Admin/issues/169 and seems you are already aware of the issues. Cheers and thanks for your work.

@CoskunSunali - Thank you for your suggestion, you are right, we have already done this issue. :)

@skoruba Great work, thanks!

Done on master. Please check new release.
Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ekjuanrejon picture ekjuanrejon  路  4Comments

weedkiller picture weedkiller  路  4Comments

imabdul-dev picture imabdul-dev  路  4Comments

Aegide picture Aegide  路  4Comments

saeedrahimi picture saeedrahimi  路  3Comments