Package org.keycloak.services.util
Class WellKnownProviderUtil
java.lang.Object
org.keycloak.services.util.WellKnownProviderUtil
Utility class for resolving
WellKnownProviderFactory instances based on their alias.
This class provides methods to interact with the available provider factories within the context
of a KeycloakSessionFactory.
This is a utility class and is not intended to be instantiated.-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<WellKnownProviderFactory>resolveFromAlias(KeycloakSessionFactory sessionFactory, String alias) Resolves aWellKnownProviderFactoryfrom the specified alias.
-
Method Details
-
resolveFromAlias
public static Optional<WellKnownProviderFactory> resolveFromAlias(KeycloakSessionFactory sessionFactory, String alias) Resolves aWellKnownProviderFactoryfrom the specified alias. If multiple factories share the same alias, the one with the lowest priority is selected.- Parameters:
sessionFactory- theKeycloakSessionFactoryto retrieve provider factories fromalias- the alias of the desiredWellKnownProviderFactory; if null, an emptyOptionalis returned- Returns:
- an
Optionalcontaining the resolvedWellKnownProviderFactory, or empty if no matching factory is found
-