Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

spring security after login redirect

	@Configuration
	@EnableWebSecurity
	public class SecSecurityConfig extends WebSecurityConfigurerAdapter {
	 
	    @Override
	    protected void configure(final HttpSecurity http) throws Exception {
	        http
	            .authorizeRequests()
	            // ... endpoints
	            .formLogin()
	                .loginPage("/login.html")
	                .loginProcessingUrl("/login")
	                .defaultSuccessUrl("/homepage.html", true)
	            // ... other configuration       
	    }
	}
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #spring #security #login #redirect
ADD COMMENT
Topic
Name
6+5 =