Package org.keycloak.services.resources
Class IdentityBrokerService
java.lang.Object
org.keycloak.services.resources.IdentityBrokerService
- All Implemented Interfaces:
IdentityProvider.AuthenticationCallback
public class IdentityBrokerService
extends Object
implements IdentityProvider.AuthenticationCallback
- Author:
- Pedro Igor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
afterFirstBrokerLogin
(String code, String clientId, String tabId) jakarta.ws.rs.core.Response
afterPostBrokerLoginFlow
(String code, String clientId, String tabId) jakarta.ws.rs.core.Response
authenticated
(BrokeredIdentityContext context) protected jakarta.ws.rs.core.Response
browserAuthentication
(AuthenticationSessionModel authSession, String errorMessage, Object... parameters) jakarta.ws.rs.core.Response
cancelled
(IdentityProviderModel idpConfig) jakarta.ws.rs.core.Response
clientInitiatedAccountLinking
(String providerAlias, String redirectUri, String clientId, String nonce, String hash) jakarta.ws.rs.core.Response
clientIntiatedAccountLinkingPreflight
(String providerAlias) Closes off CORS preflight requests for account linkingjakarta.ws.rs.core.Response
getAndVerifyAuthenticationSession
(String encodedCode) getEndpoint
(String providerAlias) static IdentityProvider<?>
getIdentityProvider
(KeycloakSession session, RealmModel realm, String alias) static IdentityProviderFactory<?>
getIdentityProviderFactory
(KeycloakSession session, IdentityProviderModel model) void
init()
jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
performPostLogin
(String providerAlias, String code, String clientId, String tabId, String loginHint) jakarta.ws.rs.core.Response
retrieveToken
(String providerAlias) jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
validateUser
(AuthenticationSessionModel authSession, UserModel user, RealmModel realm)
-
Constructor Details
-
IdentityBrokerService
-
-
Method Details
-
init
public void init() -
clientIntiatedAccountLinkingPreflight
@OPTIONS @Path("/{provider_alias}/link") public jakarta.ws.rs.core.Response clientIntiatedAccountLinkingPreflight(@PathParam("provider_alias") String providerAlias) Closes off CORS preflight requests for account linking- Parameters:
providerAlias
-- Returns:
-
clientInitiatedAccountLinking
@GET @Path("/{provider_alias}/link") public jakarta.ws.rs.core.Response clientInitiatedAccountLinking(@PathParam("provider_alias") String providerAlias, @QueryParam("redirect_uri") String redirectUri, @QueryParam("client_id") String clientId, @QueryParam("nonce") String nonce, @QueryParam("hash") String hash) -
performPostLogin
@POST @Path("/{provider_alias}/login") public jakarta.ws.rs.core.Response performPostLogin(@PathParam("provider_alias") String providerAlias, @QueryParam("session_code") String code, @QueryParam("client_id") String clientId, @QueryParam("tab_id") String tabId, @QueryParam("login_hint") String loginHint) -
performLogin
-
getEndpoint
-
retrieveTokenPreflight
@Path("{provider_alias}/token") @OPTIONS public jakarta.ws.rs.core.Response retrieveTokenPreflight() -
retrieveToken
@GET @Path("{provider_alias}/token") public jakarta.ws.rs.core.Response retrieveToken(@PathParam("provider_alias") String providerAlias) -
authenticated
- Specified by:
authenticated
in interfaceIdentityProvider.AuthenticationCallback
-
validateUser
public jakarta.ws.rs.core.Response validateUser(AuthenticationSessionModel authSession, UserModel user, RealmModel realm) -
afterFirstBrokerLogin
-
afterPostBrokerLoginFlow
-
cancelled
- Specified by:
cancelled
in interfaceIdentityProvider.AuthenticationCallback
-
error
- Specified by:
error
in interfaceIdentityProvider.AuthenticationCallback
-
getAndVerifyAuthenticationSession
- Specified by:
getAndVerifyAuthenticationSession
in interfaceIdentityProvider.AuthenticationCallback
-
browserAuthentication
protected jakarta.ws.rs.core.Response browserAuthentication(AuthenticationSessionModel authSession, String errorMessage, Object... parameters) -
getIdentityProvider
public static IdentityProvider<?> getIdentityProvider(KeycloakSession session, RealmModel realm, String alias) -
getIdentityProviderFactory
public static IdentityProviderFactory<?> getIdentityProviderFactory(KeycloakSession session, IdentityProviderModel model)
-