You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The keycloak-admin documentation advises to periodically refresh the
token by calling an openid-client. However, RFC 6749 section 4.4.3 says
that refresh token should not be issued on client_credentials grants.
Since the plugin only uses client_credentials, I removed the call to
keycloak-admin, relying only on openid-client to get the TokenSet.
I also added a bit of logic to reauth when the TokenSet is expired.
Testing it by setting Keycloak to expire tokens after one minute seems
to be working; when tokens are marked as expired, the plugin reauths and
requests proceed as normal.
Note that I only use the resource creation part of the plugin;
more testing is required before I could call this a complete fix.
0 commit comments