Package org.keycloak.broker.provider
Interface UserAuthenticationIdentityProvider<C extends IdentityProviderModel>
- All Superinterfaces:
IdentityProvider<C>,Provider
- All Known Subinterfaces:
SocialIdentityProvider<C>
- All Known Implementing Classes:
AbstractIdentityProvider,AbstractOAuth2IdentityProvider,BitbucketIdentityProvider,FacebookIdentityProvider,GitHubIdentityProvider,GitLabIdentityProvider,GoogleIdentityProvider,InstagramIdentityProvider,KeycloakOIDCIdentityProvider,LinkedInOIDCIdentityProvider,MicrosoftIdentityProvider,OAuth2IdentityProvider,OID4VPIdentityProvider,OIDCIdentityProvider,OpenshiftV4IdentityProvider,PayPalIdentityProvider,SAMLIdentityProvider,StackoverflowIdentityProvider,TwitterIdentityProvider
public interface UserAuthenticationIdentityProvider<C extends IdentityProviderModel>
extends IdentityProvider<C>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticationFinished(AuthenticationSessionModel authSession, BrokeredIdentityContext context) voidbackchannelLogout(KeycloakSession session, UserSessionModel userSession, jakarta.ws.rs.core.UriInfo uriInfo, RealmModel realm) callback(RealmModel realm, UserAuthenticationIdentityProvider.AuthenticationCallback callback, EventBuilder event) JAXRS callback endpoint for when the remote IDP wants to callback to keycloak.Implementation of marshaller to serialize/deserialize attached data to Strings, which can be saved in clientSessionvoidimportNewUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context) jakarta.ws.rs.core.ResponsekeycloakInitiatedBrowserLogout(KeycloakSession session, UserSessionModel userSession, jakarta.ws.rs.core.UriInfo uriInfo, RealmModel realm) Called when a Keycloak application initiates a logout through the browser.jakarta.ws.rs.core.ResponseperformLogin(AuthenticationRequest request) Initiates the authentication process by sending an authentication request to an identity provider.voidpreprocessFederatedIdentity(KeycloakSession session, RealmModel realm, BrokeredIdentityContext context) jakarta.ws.rs.core.ResponseretrieveToken(KeycloakSession session, FederatedIdentityModel identity) Deprecated.jakarta.ws.rs.core.ResponseretrieveToken(KeycloakSession session, FederatedIdentityModel identity, UserSessionModel userSession, UserModel user) Returns aResponsecontaining the token previously stored during the authentication process for a specific user.default booleandefault voidupdateBrokeredEmail(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context) Applies the provider's email synchronization and verification policy before an authentication execution relies on the user's email.voidupdateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context) Methods inherited from interface org.keycloak.broker.provider.IdentityProvider
export, getConfig, isMapperSupported, isType, reloadKeys
-
Field Details
-
EXTERNAL_IDENTITY_PROVIDER
- See Also:
-
FEDERATED_ACCESS_TOKEN
- See Also:
-
-
Method Details
-
preprocessFederatedIdentity
void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, BrokeredIdentityContext context) -
authenticationFinished
void authenticationFinished(AuthenticationSessionModel authSession, BrokeredIdentityContext context) -
importNewUser
void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context) -
updateBrokeredUser
void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context) -
updateBrokeredEmail
default void updateBrokeredEmail(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context) Applies the provider's email synchronization and verification policy before an authentication execution relies on the user's email. Does not import the user or run identity provider mappers. Providers that synchronize email should apply the same policy here as inupdateBrokeredUser(org.keycloak.models.KeycloakSession, org.keycloak.models.RealmModel, org.keycloak.models.UserModel, org.keycloak.broker.provider.BrokeredIdentityContext). -
callback
Object callback(RealmModel realm, UserAuthenticationIdentityProvider.AuthenticationCallback callback, EventBuilder event) JAXRS callback endpoint for when the remote IDP wants to callback to keycloak.- Returns:
-
performLogin
Initiates the authentication process by sending an authentication request to an identity provider. This method is called only once during the authentication.
- Parameters:
request- The initial authentication request. Contains all the contextual information in order to build an authentication request to the identity provider.- Returns:
-
retrieveToken
@Deprecated jakarta.ws.rs.core.Response retrieveToken(KeycloakSession session, FederatedIdentityModel identity) Deprecated.Returns a
Responsecontaining the token previously stored during the authentication process for a specific user. Deprecated method used for Identity Brokering API V1 that only uses the database.- Parameters:
session-identity-- Returns:
-
retrieveToken
jakarta.ws.rs.core.Response retrieveToken(KeycloakSession session, FederatedIdentityModel identity, UserSessionModel userSession, UserModel user) Returns a
Responsecontaining the token previously stored during the authentication process for a specific user. This method looks in the user session and in the database if not present.- Parameters:
session-identity-userSession-user-- Returns:
-
backchannelLogout
void backchannelLogout(KeycloakSession session, UserSessionModel userSession, jakarta.ws.rs.core.UriInfo uriInfo, RealmModel realm) -
keycloakInitiatedBrowserLogout
jakarta.ws.rs.core.Response keycloakInitiatedBrowserLogout(KeycloakSession session, UserSessionModel userSession, jakarta.ws.rs.core.UriInfo uriInfo, RealmModel realm) Called when a Keycloak application initiates a logout through the browser. This is expected to do a logout with the IDP- Parameters:
userSession-uriInfo-realm-- Returns:
- null if this is not supported by this provider
-
getMarshaller
IdentityProviderDataMarshaller getMarshaller()Implementation of marshaller to serialize/deserialize attached data to Strings, which can be saved in clientSession- Returns:
-
supportsLongStateParameter
default boolean supportsLongStateParameter()- Returns:
- true if identity provider supports long value of "state" parameter (or "RelayState" parameter), which can hold relatively big amount of context data
-