Answer the question
In order to leave comments, you need to log in
spring security. Pop-up authorization windows, how to register loginpage in security configuration?
There is a configuration
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers(
"/registration***",
"/js/**",
"/css/**",
"/img/***",
).permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login")
.permitAll()
.and()
.logout()
.invalidateHttpSession(true)
.clearAuthentication(true)
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/login?logout")
.permitAll();
}
Answer the question
In order to leave comments, you need to log in
Hello!
Your question is not entirely clear...
Here is the configuration snippet
.and()
.formLogin()
.loginPage("/login")
.loginProcessingUrl("/login")
.usernameParameter("email")
.passwordParameter("password")
.defaultSuccessUrl("/dashboard")
.failureUrl("/login?logout")
.permitAll()
when you click on the login, a window pops up and the link looks like site.com/***?login
?login
is just a request parameter
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question