From de70a8595cbf891e5885be2220f5a3ecd5a623f8 Mon Sep 17 00:00:00 2001 From: DOHA Date: Thu, 3 Dec 2015 21:58:00 +0200 Subject: [PATCH] minor fix --- .../main/java/org/baeldung/config/ServerSecurityConfig.java | 2 +- .../src/main/java/org/baeldung/config/UiWebConfig.java | 3 ++- .../src/main/resources/templates/header.html | 2 +- .../src/main/java/org/baeldung/config/UiWebConfig.java | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerSecurityConfig.java b/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerSecurityConfig.java index 5a09bb7e03..3e1a8a8ccb 100644 --- a/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerSecurityConfig.java +++ b/spring-security-oauth/spring-security-oauth-server/src/main/java/org/baeldung/config/ServerSecurityConfig.java @@ -28,7 +28,7 @@ public class ServerSecurityConfig extends WebSecurityConfigurerAdapter { http.authorizeRequests() .antMatchers("/login").permitAll() .anyRequest().authenticated() - // .and().formLogin().permitAll() + .and().formLogin().permitAll() ; // @formatter:on } diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java index 2ee0585615..71197ce5d2 100644 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java +++ b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java @@ -26,8 +26,9 @@ public class UiWebConfig extends WebMvcConfigurerAdapter { @Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); - registry.addViewController("/index"); + registry.addViewController("/").setViewName("forward:/index"); registry.addViewController("/oauthTemp"); + registry.addViewController("/index"); } @Override diff --git a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/header.html b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/header.html index f56ff0ce99..a62bce9747 100644 --- a/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/header.html +++ b/spring-security-oauth/spring-security-oauth-ui-implicit/src/main/resources/templates/header.html @@ -12,7 +12,7 @@ diff --git a/spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java b/spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java index 46e7f6db42..0732182354 100644 --- a/spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java +++ b/spring-security-oauth/spring-security-oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java @@ -26,6 +26,7 @@ public class UiWebConfig extends WebMvcConfigurerAdapter { @Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); + registry.addViewController("/").setViewName("forward:/index"); registry.addViewController("/index"); registry.addViewController("/login"); }