Class AbstactKeycloakDelegateAuthenticationHandler
- java.lang.Object
-
- io.vertigo.vega.impl.servlet.filter.AbstactKeycloakDelegateAuthenticationHandler
-
- All Implemented Interfaces:
DelegateAuthenticationFilterHandler
public abstract class AbstactKeycloakDelegateAuthenticationHandler extends Object implements DelegateAuthenticationFilterHandler
This class provides predinied workflow for authenticating Vertigo users with a keycloak server using OpenIdConnect protocol. It is mainly insipired by theKeycloakOIDCFilterprovided by Keycloak- Version:
- $Revision: 1 $
- Author:
- mlaroche, Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected org.keycloak.adapters.AdapterDeploymentContextdeploymentContextprotected org.keycloak.adapters.spi.SessionIdMapperidMapperprotected static org.apache.logging.log4j.Loggerlogprotected org.keycloak.adapters.NodesRegistrationManagementnodesRegistrationManagement
-
Constructor Summary
Constructors Constructor Description AbstactKeycloakDelegateAuthenticationHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddoAfterChain(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Code to execute before the after to the filter chain.io.vertigo.core.lang.Tuple<Boolean,javax.servlet.http.HttpServletRequest>doBeforeChain(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Code to execute before the call to the filter chain.voiddoFinally(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Code to execute in a finally block that wraps all the calls to this delegate and the filter chainabstract booleandoLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)voidinit(io.vertigo.connectors.keycloak.KeycloakDeploymentConnector keycloakDeploymentConnector)
-
-
-
Field Detail
-
log
protected static final org.apache.logging.log4j.Logger log
-
deploymentContext
protected org.keycloak.adapters.AdapterDeploymentContext deploymentContext
-
idMapper
protected final org.keycloak.adapters.spi.SessionIdMapper idMapper
-
nodesRegistrationManagement
protected org.keycloak.adapters.NodesRegistrationManagement nodesRegistrationManagement
-
-
Method Detail
-
init
public void init(io.vertigo.connectors.keycloak.KeycloakDeploymentConnector keycloakDeploymentConnector)
-
doBeforeChain
public io.vertigo.core.lang.Tuple<Boolean,javax.servlet.http.HttpServletRequest> doBeforeChain(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Code to execute before the call to the filter chain.- Specified by:
doBeforeChainin interfaceDelegateAuthenticationFilterHandler- Parameters:
request- the httpRequestresponse- the httpResponse- Returns:
- a tuple composed of two values : - a boolean to indicate wether the request has been handled in the method and chain must be stopped - the HttpRequest that will be transfered in the filter chain. (for example if you need to wrap it for any reason )
-
doLogin
public abstract boolean doLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
doAfterChain
public void doAfterChain(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Code to execute before the after to the filter chain.- Specified by:
doAfterChainin interfaceDelegateAuthenticationFilterHandler- Parameters:
request- the httpRequestresponse- the httpResponse
-
doFinally
public void doFinally(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Code to execute in a finally block that wraps all the calls to this delegate and the filter chain- Specified by:
doFinallyin interfaceDelegateAuthenticationFilterHandler- Parameters:
request- the httpRequestresponse- the httpResponse
-
-