Class OrganizationAwareIdentityProviderBean
java.lang.Object
org.keycloak.forms.login.freemarker.model.IdentityProviderBean
org.keycloak.organization.forms.login.freemarker.model.OrganizationAwareIdentityProviderBean
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.forms.login.freemarker.model.IdentityProviderBean
IdentityProviderBean.IdentityProvider -
Field Summary
Fields inherited from class org.keycloak.forms.login.freemarker.model.IdentityProviderBean
baseURI, context, IDP_COMPARATOR_INSTANCE, providers, realm, session -
Constructor Summary
ConstructorsConstructorDescriptionOrganizationAwareIdentityProviderBean(IdentityProviderBean delegate, boolean onlyOrganizationBrokers) OrganizationAwareIdentityProviderBean(IdentityProviderBean delegate, boolean onlyOrganizationBrokers, boolean onlyRealmBrokers) -
Method Summary
Modifier and TypeMethodDescriptionprotected Predicate<org.keycloak.models.IdentityProviderModel>Returns a predicate that can filter out IDPs associated with the current user's federated identities before those are converted intoIdentityProviderBean.IdentityProviders.getLinkedBrokerAliases(org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.authentication.AuthenticationFlowContext context) Returns the list of IDPs linked with the user's federated identities, if any.protected List<IdentityProviderBean.IdentityProvider>searchForIdentityProviders(String existingIDP) Builds and returns a list ofIdentityProviderBean.IdentityProviderinstances that will be available for login.Methods inherited from class org.keycloak.forms.login.freemarker.model.IdentityProviderBean
createIdentityProvider, getBaseURI, getExistingIDP, getFederatedIdentityProviders, getFlowContext, getProviders, getRealm, getSession
-
Constructor Details
-
OrganizationAwareIdentityProviderBean
-
OrganizationAwareIdentityProviderBean
public OrganizationAwareIdentityProviderBean(IdentityProviderBean delegate, boolean onlyOrganizationBrokers) -
OrganizationAwareIdentityProviderBean
public OrganizationAwareIdentityProviderBean(IdentityProviderBean delegate, boolean onlyOrganizationBrokers, boolean onlyRealmBrokers)
-
-
Method Details
-
getLinkedBrokerAliases
protected Set<String> getLinkedBrokerAliases(org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.authentication.AuthenticationFlowContext context) Description copied from class:IdentityProviderBeanReturns the list of IDPs linked with the user's federated identities, if any. In case these IDPs exist, the login page should show only the IDPs already linked to the user. Returningnullindicates that all public enabled IDPs should be available. Returning an empty set essentially narrows the list of available IDPs to zero, so no IDPs will be shown for login.- Overrides:
getLinkedBrokerAliasesin classIdentityProviderBean- Parameters:
session- a reference to theKeycloakSession.realm- a reference to the realm.context- a reference to theAuthenticationFlowContext.- Returns:
- a
Setcontaining the aliases of the IDPs that should be available for login. An empty set indicates that no IDPs should be available.
-
searchForIdentityProviders
protected List<IdentityProviderBean.IdentityProvider> searchForIdentityProviders(String existingIDP) Description copied from class:IdentityProviderBeanBuilds and returns a list ofIdentityProviderBean.IdentityProviderinstances that will be available for login. This method goes to theIdentityProviderStorageProviderto fetch the IDPs that can be used for login (enabled, not link-only and not set to be hidden on login page).- Overrides:
searchForIdentityProvidersin classIdentityProviderBean- Parameters:
existingIDP- the alias of the IDP that must be filtered out from the result (used when linking a new IDP to a user's account).- Returns:
- a
Listcontaining the constructedIdentityProviderBean.IdentityProviders.
-
federatedProviderPredicate
Description copied from class:IdentityProviderBeanReturns a predicate that can filter out IDPs associated with the current user's federated identities before those are converted intoIdentityProviderBean.IdentityProviders. Subclasses may use this as a way to further refine the IDPs that are to be returned.- Overrides:
federatedProviderPredicatein classIdentityProviderBean- Returns:
- the custom
Predicateused as a last filter before conversion intoIdentityProviderBean.IdentityProvider
-