test_class.declarator: authenticationEntryPoint
test_class.modifier: private
test_class.original_string: private KeycloakAuthenticationEntryPoint authenticationEntryPoint;
test_class.type: KeycloakAuthenticationEntryPoint
test_class.var_name: authenticationEntryPoint
test_class.declarator: request
test_class.modifier: private
test_class.original_string: private MockHttpServletRequest request;
test_class.type: MockHttpServletRequest
test_class.var_name: request
test_class.declarator: response
test_class.modifier: private
test_class.original_string: private MockHttpServletResponse response;
test_class.type: MockHttpServletResponse
test_class.var_name: response
test_class.declarator: applicationContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ApplicationContext applicationContext;
test_class.type: ApplicationContext
test_class.var_name: applicationContext
test_class.declarator: adapterDeploymentContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AdapterDeploymentContext adapterDeploymentContext;
test_class.type: AdapterDeploymentContext
test_class.var_name: adapterDeploymentContext
test_class.declarator: keycloakDeployment
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private KeycloakDeployment keycloakDeployment;
test_class.type: KeycloakDeployment
test_class.var_name: keycloakDeployment
test_class.declarator: requestMatcher
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private RequestMatcher requestMatcher;
test_class.type: RequestMatcher
test_class.var_name: requestMatcher
test_class.file: adapters/oidc/spring-security/src/test/java/org/keycloak/adapters/springsecurity/authentication/KeycloakAuthenticationEntryPointTest.java
test_class.identifier: KeycloakAuthenticationEntryPointTest
test_case.body: @Test
      public void testCommenceWithCustomRequestMatcher() throws Exception {
          new KeycloakAuthenticationEntryPoint(adapterDeploymentContext, requestMatcher)
              .commence(request, response, null);
  
          verify(requestMatcher).matches(request);
      }
test_case.class_method_signature: KeycloakAuthenticationEntryPointTest.testCommenceWithCustomRequestMatcher()
test_case.full_signature: @Test public void testCommenceWithCustomRequestMatcher()
test_case.identifier: testCommenceWithCustomRequestMatcher
test_case.invocations: commence matches verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCommenceWithCustomRequestMatcher()
focal_class.declarator: DEFAULT_LOGIN_URI = "/sso/login"
focal_class.modifier: public static final
focal_class.original_string: public static final String DEFAULT_LOGIN_URI = "/sso/login";
focal_class.type: String
focal_class.var_name: DEFAULT_LOGIN_URI
focal_class.declarator: DEFAULT_REALM = "Unknown"
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_REALM = "Unknown";
focal_class.type: String
focal_class.var_name: DEFAULT_REALM
focal_class.declarator: DEFAULT_API_REQUEST_MATCHER = new HttpHeaderInspectingApiRequestMatcher()
focal_class.modifier: private static final
focal_class.original_string: private static final RequestMatcher DEFAULT_API_REQUEST_MATCHER = new HttpHeaderInspectingApiRequestMatcher();
focal_class.type: RequestMatcher
focal_class.var_name: DEFAULT_API_REQUEST_MATCHER
focal_class.declarator: log = LoggerFactory.getLogger(KeycloakAuthenticationEntryPoint.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger log = LoggerFactory.getLogger(KeycloakAuthenticationEntryPoint.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: apiRequestMatcher
focal_class.modifier: private final
focal_class.original_string: private final RequestMatcher apiRequestMatcher;
focal_class.type: RequestMatcher
focal_class.var_name: apiRequestMatcher
focal_class.declarator: loginUri = DEFAULT_LOGIN_URI
focal_class.modifier: private
focal_class.original_string: private String loginUri = DEFAULT_LOGIN_URI;
focal_class.type: String
focal_class.var_name: loginUri
focal_class.declarator: realm = DEFAULT_REALM
focal_class.modifier: private
focal_class.original_string: private String realm = DEFAULT_REALM;
focal_class.type: String
focal_class.var_name: realm
focal_class.declarator: adapterDeploymentContext
focal_class.modifier: private
focal_class.original_string: private AdapterDeploymentContext adapterDeploymentContext;
focal_class.type: AdapterDeploymentContext
focal_class.var_name: adapterDeploymentContext
focal_class.file: adapters/oidc/spring-security/src/main/java/org/keycloak/adapters/springsecurity/authentication/KeycloakAuthenticationEntryPoint.java
focal_class.identifier: KeycloakAuthenticationEntryPoint
focal_class.interfaces: implements AuthenticationEntryPoint
focal_class.class_method_signature: KeycloakAuthenticationEntryPoint.KeycloakAuthenticationEntryPoint(AdapterDeploymentContext adapterDeploymentContext)
focal_class.full_signature: public  KeycloakAuthenticationEntryPoint(AdapterDeploymentContext adapterDeploymentContext)
focal_class.identifier: KeycloakAuthenticationEntryPoint
focal_class.modifiers: public
focal_class.parameters: (AdapterDeploymentContext adapterDeploymentContext)
focal_class.signature:  KeycloakAuthenticationEntryPoint(AdapterDeploymentContext adapterDeploymentContext)
focal_class.class_method_signature: KeycloakAuthenticationEntryPoint.KeycloakAuthenticationEntryPoint(AdapterDeploymentContext adapterDeploymentContext, RequestMatcher apiRequestMatcher)
focal_class.full_signature: public  KeycloakAuthenticationEntryPoint(AdapterDeploymentContext adapterDeploymentContext, RequestMatcher apiRequestMatcher)
focal_class.identifier: KeycloakAuthenticationEntryPoint
focal_class.modifiers: public
focal_class.parameters: (AdapterDeploymentContext adapterDeploymentContext, RequestMatcher apiRequestMatcher)
focal_class.signature:  KeycloakAuthenticationEntryPoint(AdapterDeploymentContext adapterDeploymentContext, RequestMatcher apiRequestMatcher)
focal_class.class_method_signature: KeycloakAuthenticationEntryPoint.commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)
focal_class.full_signature: @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)
focal_class.identifier: commence
focal_class.modifiers: @Override public
focal_class.parameters: (HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)
focal_class.return: void
focal_class.signature: void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)
focal_class.class_method_signature: KeycloakAuthenticationEntryPoint.commenceLoginRedirect(HttpServletRequest request, HttpServletResponse response)
focal_class.full_signature: protected void commenceLoginRedirect(HttpServletRequest request, HttpServletResponse response)
focal_class.identifier: commenceLoginRedirect
focal_class.modifiers: protected
focal_class.parameters: (HttpServletRequest request, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void commenceLoginRedirect(HttpServletRequest request, HttpServletResponse response)
focal_class.class_method_signature: KeycloakAuthenticationEntryPoint.commenceUnauthorizedResponse(HttpServletRequest request, HttpServletResponse response)
focal_class.full_signature: protected void commenceUnauthorizedResponse(HttpServletRequest request, HttpServletResponse response)
focal_class.identifier: commenceUnauthorizedResponse
focal_class.modifiers: protected
focal_class.parameters: (HttpServletRequest request, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void commenceUnauthorizedResponse(HttpServletRequest request, HttpServletResponse response)
focal_class.class_method_signature: KeycloakAuthenticationEntryPoint.setLoginUri(String loginUri)
focal_class.full_signature: public void setLoginUri(String loginUri)
focal_class.identifier: setLoginUri
focal_class.modifiers: public
focal_class.parameters: (String loginUri)
focal_class.return: void
focal_class.signature: void setLoginUri(String loginUri)
focal_class.class_method_signature: KeycloakAuthenticationEntryPoint.setRealm(String realm)
focal_class.full_signature: public void setRealm(String realm)
focal_class.identifier: setRealm
focal_class.modifiers: public
focal_class.parameters: (String realm)
focal_class.return: void
focal_class.signature: void setRealm(String realm)
focal_method.body: @Override
      public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
          HttpFacade facade = new SimpleHttpFacade(request, response);
          if (apiRequestMatcher.matches(request) || adapterDeploymentContext.resolveDeployment(facade).isBearerOnly()) {
              commenceUnauthorizedResponse(request, response);
          } else {
              commenceLoginRedirect(request, response);
          }
      }
focal_method.class_method_signature: KeycloakAuthenticationEntryPoint.commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)
focal_method.full_signature: @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)
focal_method.identifier: commence
focal_method.invocations: matches isBearerOnly resolveDeployment commenceUnauthorizedResponse commenceLoginRedirect
focal_method.modifiers: @Override public
focal_method.parameters: (HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)
focal_method.return: void
focal_method.signature: void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)