keycloak icon indicating copy to clipboard operation
keycloak copied to clipboard

`KeycloakServiceAccountAdminTokenRetriever` vs `KeycloakAdminToken`

Open omid opened this issue 1 year ago • 3 comments

Better to follow the same pattern for both structs.

One has acquire the other one has create. One the get sends a request always, in the other one uses the acquired version.

Basically, we added grant_type to KeycloakAdminToken to support service accounts, and now we have KeycloakServiceAccountAdminTokenRetriever which does the same, kinda.

omid avatar Apr 24 '24 08:04 omid

I'm working on getting admin token for service account but I found acquire is private, we need it public

https://github.com/kilork/keycloak/blob/master/src/rest/mod.rs#L66

ovnicraft avatar Jun 16 '24 23:06 ovnicraft

@ovnicraft I copy pasted the code and have my own logic! 🤷🏻

omid avatar Jun 17 '24 06:06 omid

@ovnicraft I copy pasted the code and have my own logic! 🤷🏻

Yes, btw that struct has create() and acquire, i would like to use it.

ovnicraft avatar Jun 17 '24 13:06 ovnicraft