[keycloak-user] How to retrieve identity provider name in a UserStorageProvider

Joy Kent joy at autonomic.ai
Wed Aug 15 08:45:18 EDT 2018


We have implemented a *UserStorageProvider* that stores the user
information (username, email) in an external PostgreSQL database. To be
more specific, it implements the following:

public class MyUserStorageProvider implements UserStorageProvider,
>
>      UserLookupProvider,
>
>      UserRegistrationProvider,
>
>      UserQueryProvider


As I understand it, for identity federation, the identity provider name is
stored in keycloak through *UserFederatedStorageProvider*, which is stored
in KeycloakSession instance. My question is at the time when *addUser() *in
* MyUserStorageProvider* is called, is it possible to retrieve an
*FederatedIdentityModel* object or something similar from the
KeycloakSession instance? The main piece of information I need is the
identity provider name.

Thanks,
Joy


More information about the keycloak-user mailing list