Class KeycloakRequestAuthenticator


  • public class KeycloakRequestAuthenticator
    extends org.keycloak.adapters.RequestAuthenticator
    Since:
    7.4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String KEYCLOAK_ACCESS_TOKEN  
      protected org.apache.tomcat.util.descriptor.web.LoginConfig loginConfig  
      protected org.apache.catalina.connector.Request request  
      protected javax.servlet.http.HttpServletResponse response  
      • Fields inherited from class org.keycloak.adapters.RequestAuthenticator

        challenge, deployment, facade, log, sslRedirectPort, tokenStore
    • Constructor Summary

      Constructors 
      Constructor Description
      KeycloakRequestAuthenticator​(org.apache.catalina.connector.Request request, javax.servlet.http.HttpServletResponse response, org.keycloak.adapters.tomcat.CatalinaHttpFacade facade, org.keycloak.adapters.KeycloakDeployment deployment)  
    • Field Detail

      • request

        protected org.apache.catalina.connector.Request request
      • response

        protected javax.servlet.http.HttpServletResponse response
      • loginConfig

        protected org.apache.tomcat.util.descriptor.web.LoginConfig loginConfig
    • Constructor Detail

      • KeycloakRequestAuthenticator

        public KeycloakRequestAuthenticator​(org.apache.catalina.connector.Request request,
                                            javax.servlet.http.HttpServletResponse response,
                                            org.keycloak.adapters.tomcat.CatalinaHttpFacade facade,
                                            org.keycloak.adapters.KeycloakDeployment deployment)
    • Method Detail

      • getFacade

        public org.keycloak.adapters.spi.HttpFacade getFacade()
      • authenticate

        public org.keycloak.adapters.spi.AuthOutcome authenticate()
        Overrides:
        authenticate in class org.keycloak.adapters.RequestAuthenticator
      • forwardToErrorPageInternal

        protected boolean forwardToErrorPageInternal()
      • createPrincipalFactory

        protected org.keycloak.adapters.tomcat.GenericPrincipalFactory createPrincipalFactory()
      • getTokenStore

        protected org.keycloak.adapters.AdapterTokenStore getTokenStore()
      • createOAuthAuthenticator

        protected org.keycloak.adapters.OAuthRequestAuthenticator createOAuthAuthenticator()
        Specified by:
        createOAuthAuthenticator in class org.keycloak.adapters.RequestAuthenticator
      • completeOAuthAuthentication

        protected void completeOAuthAuthentication​(org.keycloak.KeycloakPrincipal<org.keycloak.adapters.RefreshableKeycloakSecurityContext> skp)
        Specified by:
        completeOAuthAuthentication in class org.keycloak.adapters.RequestAuthenticator
      • completeBearerAuthentication

        protected void completeBearerAuthentication​(org.keycloak.KeycloakPrincipal<org.keycloak.adapters.RefreshableKeycloakSecurityContext> skp,
                                                    String method)
        Specified by:
        completeBearerAuthentication in class org.keycloak.adapters.RequestAuthenticator
      • changeHttpSessionId

        protected String changeHttpSessionId​(boolean create)
        Specified by:
        changeHttpSessionId in class org.keycloak.adapters.RequestAuthenticator