My keycloak version is 16.1.1 My client needs features like a linked account. Example Account A linked to account B, account C, account D. In session A want to switch to session account B without login with username/password again. ( May be exchange access token acccount A --> access token account B).
I have a few options to solve the problem like:
- Use Impersonate (a feature of Keycloak ) --> Problem: seem Keycloak 16 does not support.
- For Every account login i will save the refresh token to attribute of user, they can switch to another account by refresh token exchange access token --> Problem: Access token too long timespan and at least account need to login 1 time
- Find way to generate access token like keycloak but i cant find any code ( spi, or code ). Maybe need to overwrite or see code at endpoint /realms/{realm}/protocol/openid-connect/token ---> I hope someone gives me some ideas to resolve this problem. I am very happy to hear you all. Thanks so much.