silentpartnersoftware/Keycloak.Net

Is it possible to cache admin access token ?

Closed this issue · 2 comments

Hello

As far as I see both original repo and this fork are creating access token each time Keycloak API is invoked.

Can you please explain if it is possible to cache token somehow and refresh when token is expired to reduce Keycloak API load.

@ievgenii-shepeliuk Why did you close this? This important functionality is not implemented. Can we please reopen this?

@goldsam if you need this functionality the best way to achieve it with the project in it's current state is to use the Func<string> getToken constructor when initializing the KeycloakClient and have that function cache/refresh the token.

Unfortunately I am busy with other projects right now, but if you are able to write a function that can handle the token refreshes then I'd be happy to integrate it into this project.