1
0
mirror of synced 2026-08-05 01:36:56 +00:00

Use RequiredFactorErrors

Closes gh-18002
This commit is contained in:
Rob Winch
2025-10-02 15:52:03 -05:00
parent d1ff983c11
commit 2473378fcd
16 changed files with 126 additions and 54 deletions
@@ -69,7 +69,7 @@ public class AuthorizationManagerFactoryTests {
// @formatter:off
this.mockMvc.perform(get("/"))
.andExpect(status().is3xxRedirection())
.andExpect(redirectedUrl("http://localhost/login?factor=ott"));
.andExpect(redirectedUrl("http://localhost/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=password"));
.andExpect(redirectedUrl("http://localhost/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=password"));
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"));
// @formatter:on
}
@@ -58,7 +58,7 @@ public class CustomAuthorizationManagerFactoryTests {
// @formatter:off
this.mockMvc.perform(get("/"))
.andExpect(status().is3xxRedirection())
.andExpect(redirectedUrl("http://localhost/login?factor=ott"));
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"));
// @formatter:on
}
@@ -69,7 +69,7 @@ public class EnableGlobalMultiFactorAuthenticationTests {
// @formatter:off
this.mockMvc.perform(get("/"))
.andExpect(status().is3xxRedirection())
.andExpect(redirectedUrl("http://localhost/login?factor=ott"));
.andExpect(redirectedUrl("http://localhost/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=password"));
.andExpect(redirectedUrl("http://localhost/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=password"));
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"));
// @formatter:on
}
@@ -69,7 +69,7 @@ public class MultiFactorAuthenticationTests {
// @formatter:off
this.mockMvc.perform(get("/"))
.andExpect(status().is3xxRedirection())
.andExpect(redirectedUrl("http://localhost/login?factor=ott"));
.andExpect(redirectedUrl("http://localhost/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=password"));
.andExpect(redirectedUrl("http://localhost/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=password"));
.andExpect(redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"));
// @formatter:on
}
@@ -69,7 +69,7 @@ public class ReauthenticationTests {
// @formatter:off
this.mockMvc.perform(get("/profile"))
.andExpect(status().is3xxRedirection())
.andExpect(redirectedUrl("http://localhost/login?factor=ott"));
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"));
// @formatter:on
}
@@ -68,7 +68,7 @@ class AuthorizationManagerFactoryTests {
// @formatter:off
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor=ott"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/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=password"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/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=password"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"))
// @formatter:on
}
@@ -55,7 +55,7 @@ class CustomAuthorizationManagerFactoryTests {
// @formatter:off
this.mockMvc!!.perform(get("/"))
.andExpect(status().is3xxRedirection())
.andExpect(redirectedUrl("http://localhost/login?factor=ott"))
.andExpect(redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"))
// @formatter:on
}
@@ -68,7 +68,7 @@ class AuthorizationManagerFactoryTests {
// @formatter:off
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor=ott"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/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=password"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/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=password"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"))
// @formatter:on
}
@@ -66,7 +66,7 @@ class MultiFactorAuthenticationTests {
// @formatter:off
this.mockMvc!!.perform(MockMvcRequestBuilders.get("/"))
.andExpect(MockMvcResultMatchers.status().is3xxRedirection())
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor=ott"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/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=password"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/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=password"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=password&factor.reason=missing"))
// @formatter:on
}
@@ -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=ott"))
.andExpect(MockMvcResultMatchers.redirectedUrl("http://localhost/login?factor.type=ott&factor.reason=missing"))
// @formatter:on
}