code: @Override
      protected void configure(final HttpSecurity http) throws Exception {
          handleCsrf(http)
              .sessionManagement()
                  .sessionCreationPolicy(SessionCreationPolicy.STATELESS)
              .and().exceptionHandling()
                  .authenticationEntryPoint(restAuthenticationEntryPoint)
              .and().addFilterBefore(jwtAuthenticationTokenFilter(),
                      BasicAuthenticationFilter.class)
                  .authorizeRequests()
                  .anyRequest()
                  .authenticated()
              .and().formLogin()
                  .loginPage("/gedbrowserng/v1/login")
                  .successHandler(authenticationSuccessHandler)
                  .failureHandler(authenticationFailureHandler)
              .and().logout()
                  .logoutRequestMatcher(
                          new AntPathRequestMatcher("/gedbrowserng/v1/logout"))
                  .logoutSuccessHandler(logoutSuccess)
                  .deleteCookies(cookie);
      }
docs: {@inheritDoc}