Fix to many redirects on remember me

This commit is contained in:
Paulo Gustavo Veiga 2022-02-27 13:11:55 -08:00
parent b60f5b331f
commit 732127a7a9
3 changed files with 3 additions and 7 deletions

View File

@ -19,13 +19,10 @@
package com.wisemapping.webmvc; package com.wisemapping.webmvc;
import com.wisemapping.security.Utils;
import com.wisemapping.service.UserService; import com.wisemapping.service.UserService;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;

View File

@ -2,7 +2,6 @@
<tiles-definitions> <tiles-definitions>
<definition name="homepage" template="/jsp/homepage.jsp"/>
<definition name="mindmapEmbedded" template="/jsp/mindmapViewonly.jsp"/> <definition name="mindmapEmbedded" template="/jsp/mindmapViewonly.jsp"/>
<definition name="mindmapEditor" template="/jsp/mindmapEditor.jsp"/> <definition name="mindmapEditor" template="/jsp/mindmapEditor.jsp"/>
<definition name="mindmapPrint" template="/jsp/mindmapViewonly.jsp"/> <definition name="mindmapPrint" template="/jsp/mindmapViewonly.jsp"/>

View File

@ -46,14 +46,14 @@
<sec:http use-expressions="true" pattern="/c/**/*"> <sec:http use-expressions="true" pattern="/c/**/*">
<sec:csrf request-matcher-ref="requestMatcher"/> <sec:csrf request-matcher-ref="requestMatcher"/>
<sec:intercept-url pattern="/c/login" access="hasRole('ANONYMOUS')"/> <sec:intercept-url pattern="/c/login" access="permitAll"/>
<sec:intercept-url pattern="/c/registration" access="hasRole('ANONYMOUS')"/> <sec:intercept-url pattern="/c/registration" access="hasRole('ANONYMOUS')"/>
<sec:intercept-url pattern="/c/registration-success" access="hasRole('ANONYMOUS')"/> <sec:intercept-url pattern="/c/registration-success" access="hasRole('ANONYMOUS')"/>
<sec:intercept-url pattern="/c/forgot-password" access="hasRole('ANONYMOUS')"/> <sec:intercept-url pattern="/c/forgot-password" access="hasRole('ANONYMOUS')"/>
<sec:intercept-url pattern="/c/forgot-password-success" access="hasRole('ANONYMOUS')"/> <sec:intercept-url pattern="/c/forgot-password-success" access="hasRole('ANONYMOUS')"/>
<sec:intercept-url pattern="/c/**/*" access="isAuthenticated() and hasRole('ROLE_USER')"/> <sec:intercept-url pattern="/c/**/*" access="isAuthenticated() and hasRole('ROLE_USER')"/>
<sec:access-denied-handler error-page="/c/maps/"/> <sec:access-denied-handler error-page="/c/login"/>
<sec:form-login login-page="/c/login" <sec:form-login login-page="/c/login"
authentication-success-handler-ref="authenticationSuccessHandler" authentication-success-handler-ref="authenticationSuccessHandler"
always-use-default-target="false" always-use-default-target="false"
@ -61,7 +61,7 @@
login-processing-url="/c/perform-login"/> login-processing-url="/c/perform-login"/>
<!-- Expire in 28 days --> <!-- Expire in 28 days -->
<!-- <sec:remember-me token-validity-seconds="2419200" remember-me-parameter="remember-me"/>--> <sec:remember-me token-validity-seconds="2419200" remember-me-parameter="remember-me"/>
<sec:logout logout-url="/c/logout" invalidate-session="true" logout-success-url="/c/login"/> <sec:logout logout-url="/c/logout" invalidate-session="true" logout-success-url="/c/login"/>
</sec:http> </sec:http>