Class SimulatedAuthenticationController
java.lang.Object
se.swedenconnect.spring.saml.idp.authentication.provider.external.AbstractAuthenticationController<SimulatedAuthenticationProvider>
se.swedenconnect.spring.saml.idp.demo.authn.SimulatedAuthenticationController
@Controller
public class SimulatedAuthenticationController
extends AbstractAuthenticationController<SimulatedAuthenticationProvider>
The controller handling user authentication.
- Author:
- Martin Lindström
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) The entry point for the user authentication.complete(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userName, String action) When the user has "authenticated", the browser is posted back to this entry point to complete the authentication.protected SimulatedAuthenticationProviderGets theUserRedirectAuthenticationProviderfor this type of user authentication.Methods inherited from class se.swedenconnect.spring.saml.idp.authentication.provider.external.AbstractAuthenticationController
cancel, complete, complete, getInputToken
-
Field Details
-
AUTHN_PATH
- See Also:
-
-
Constructor Details
-
SimulatedAuthenticationController
public SimulatedAuthenticationController()
-
-
Method Details
-
authenticate
@GetMapping("/authn") public ModelAndView authenticate(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) The entry point for the user authentication.- Parameters:
request- the HTTP servlet requestresponse- the HTTP servlet response- Returns:
- a
ModelAndView
-
complete
@PostMapping("/authn/complete") public ModelAndView complete(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @RequestParam(name="username") String userName, @RequestParam("action") String action) When the user has "authenticated", the browser is posted back to this entry point to complete the authentication.- Parameters:
request- the HTTP servlet requestresponse- the HTTP servlet responseuserName- the user name of the simulated useraction- the action- Returns:
- a
ModelAndViewthat redirects the browser back to the Spring Security flow
-
getProvider
Gets theUserRedirectAuthenticationProviderfor this type of user authentication.- Specified by:
getProviderin classAbstractAuthenticationController<SimulatedAuthenticationProvider>- Returns:
- the user authentication provider
-