Favor Relative Redirects by Default
Closes gh-16300
This commit is contained in:
+4
-4
@@ -69,7 +69,7 @@ public class AuthorizationManagerFactoryTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class AuthorizationManagerFactoryTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=password&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class AuthorizationManagerFactoryTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class AuthorizationManagerFactoryTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login"));
|
||||
.andExpect(redirectedUrl("/login"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -69,7 +69,7 @@ public class EnableGlobalMultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class EnableGlobalMultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=password&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class EnableGlobalMultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class EnableGlobalMultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login"));
|
||||
.andExpect(redirectedUrl("/login"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -69,7 +69,7 @@ public class MultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class MultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=password&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class MultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class MultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login"));
|
||||
.andExpect(redirectedUrl("/login"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -69,7 +69,7 @@ public class MultipleAuthorizationRulesConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class MultipleAuthorizationRulesConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=password&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class MultipleAuthorizationRulesConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class MultipleAuthorizationRulesConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login"));
|
||||
.andExpect(redirectedUrl("/login"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class AdminMfaAuthorizationManagerConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.type=password&factor.reason=missing&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.type=password&factor.reason=missing&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class RequiredAuthoritiesAuthorizationManagerConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.type=password&factor.reason=missing&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.type=password&factor.reason=missing&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class ReauthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/profile"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -59,7 +59,7 @@ public class SelectiveMfaConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/admin/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrlPattern("http://localhost/login?*"));
|
||||
.andExpect(redirectedUrlPattern("/login?*"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class SelectiveMfaConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/admin/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"));
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.reason=missing"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class SelectiveMfaConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/user/settings/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrlPattern("http://localhost/login?*"));
|
||||
.andExpect(redirectedUrlPattern("/login?*"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -63,7 +63,7 @@ public class ValidDurationConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/admin/").with(admin(Duration.ofMinutes(31))))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrlPattern("http://localhost/login?*"));
|
||||
.andExpect(redirectedUrlPattern("/login?*"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ValidDurationConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc.perform(get("/user/settings").with(user(Duration.ofMinutes(61))))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrlPattern("http://localhost/login?*"));
|
||||
.andExpect(redirectedUrlPattern("/login?*"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -68,7 +68,7 @@ class AuthorizationManagerFactoryTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=ott&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class AuthorizationManagerFactoryTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=password&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class AuthorizationManagerFactoryTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ class AuthorizationManagerFactoryTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -66,7 +66,7 @@ class EnableGlobalMultiFactorAuthenticationConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=ott&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class EnableGlobalMultiFactorAuthenticationConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=password&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class EnableGlobalMultiFactorAuthenticationConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class EnableGlobalMultiFactorAuthenticationConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -66,7 +66,7 @@ class MultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=ott&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class MultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=password&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class MultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class MultiFactorAuthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -66,7 +66,7 @@ class MultipleAuthorizationRulesConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=ott&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class MultipleAuthorizationRulesConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=password&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class MultipleAuthorizationRulesConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=password&factor.type=ott&factor.reason=missing&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class MultipleAuthorizationRulesConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class AdminMfaAuthorizationManagerConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(get("/"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.type=password&factor.reason=missing&factor.reason=missing"))
|
||||
.andExpect(redirectedUrl("/login?factor.type=ott&factor.type=password&factor.reason=missing&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ class ReauthenticationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/profile"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=ott&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -56,7 +56,7 @@ class SelectiveMfaConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/admin/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrlPattern("http://localhost/login?*"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrlPattern("/login?*"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class SelectiveMfaConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/admin/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrl("/login?factor.type=ott&factor.reason=missing"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class SelectiveMfaConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/user/settings/"))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrlPattern("http://localhost/login?*"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrlPattern("/login?*"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -60,7 +60,7 @@ class ValidDurationConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/admin/").with(admin(Duration.ofMinutes(31))))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrlPattern("http://localhost/login?*"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrlPattern("/login?*"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class ValidDurationConfigurationTests {
|
||||
// @formatter:off
|
||||
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/user/settings").with(user(Duration.ofMinutes(61))))
|
||||
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrlPattern("http://localhost/login?*"))
|
||||
.andExpect(MockMvcResultMatchers.redirectedUrlPattern("/login?*"))
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user