Package com.okta.spring.example.helpers
Class ResponseHandler
java.lang.Object
com.okta.spring.example.helpers.ResponseHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.servlet.ModelAndViewhandleKnownTransitions(AuthenticationResponse response, javax.servlet.http.HttpSession session) Return view based on the authentication status in response.org.springframework.web.servlet.ModelAndViewhandleTerminalTransitions(AuthenticationResponse response, javax.servlet.http.HttpSession session) Return terminal views based on the authentication status in response.booleanneedsToShowErrors(AuthenticationResponse response) Check if response contains presentable errors.org.springframework.web.servlet.ModelAndViewoktaVerifyChallenge(AuthenticationResponse response) Return the view for Okta Verify challenge.org.springframework.web.servlet.ModelAndViewoktaVerifyViaChannelDataForm(Authenticator.Factor factor, javax.servlet.http.HttpSession session) Return the view for okta verify form via channel data.org.springframework.web.servlet.ModelAndViewregisterVerifyForm(Authenticator.Factor factor, AuthenticationResponse authenticationResponse) Return the view for register verify form.org.springframework.web.servlet.ModelAndViewregisterVerifyForm(Authenticator authenticator, AuthenticationResponse authenticationResponse) Return the view for verify form.org.springframework.web.servlet.ModelAndViewselectAuthenticatorForm(AuthenticationResponse response, String title, javax.servlet.http.HttpSession session) Return the view for select authenticator form.org.springframework.web.servlet.ModelAndViewsetupOktaVerifyForm(javax.servlet.http.HttpSession session) Return the view for okta verify form.org.springframework.web.servlet.ModelAndViewReturn the view for verify form.org.springframework.web.servlet.ModelAndViewverifyForm(AuthenticationResponse response) Return the view for verify form.org.springframework.web.servlet.ModelAndViewverifyWebauthn(AuthenticationResponse enrollResponse) Return the view for verify form.
-
Constructor Details
-
ResponseHandler
public ResponseHandler()
-
-
Method Details
-
needsToShowErrors
Check if response contains presentable errors.- Parameters:
response- the response- Returns:
- true if the caller should show errors; false otherwise
-
handleTerminalTransitions
public org.springframework.web.servlet.ModelAndView handleTerminalTransitions(AuthenticationResponse response, javax.servlet.http.HttpSession session) Return terminal views based on the authentication status in response.- Parameters:
response- the responsesession- the session- Returns:
- the view associated with the response authentication status or null.
-
handleKnownTransitions
public org.springframework.web.servlet.ModelAndView handleKnownTransitions(AuthenticationResponse response, javax.servlet.http.HttpSession session) Return view based on the authentication status in response.- Parameters:
response- the responsesession- the session- Returns:
- the view with the status associated with the response.
-
selectAuthenticatorForm
public org.springframework.web.servlet.ModelAndView selectAuthenticatorForm(AuthenticationResponse response, String title, javax.servlet.http.HttpSession session) Return the view for select authenticator form.- Parameters:
response- the responsetitle- the view titlesession- the session- Returns:
- the view associated with the response authentication status.
-
oktaVerifyChallenge
public org.springframework.web.servlet.ModelAndView oktaVerifyChallenge(AuthenticationResponse response) Return the view for Okta Verify challenge.- Parameters:
response- the response- Returns:
- the view for the register verify form.
-
registerVerifyForm
public org.springframework.web.servlet.ModelAndView registerVerifyForm(Authenticator.Factor factor, AuthenticationResponse authenticationResponse) Return the view for register verify form.- Parameters:
factor- the factorauthenticationResponse- authentication response- Returns:
- the view for the register verify form.
-
registerVerifyForm
public org.springframework.web.servlet.ModelAndView registerVerifyForm(Authenticator authenticator, AuthenticationResponse authenticationResponse) Return the view for verify form.- Parameters:
authenticator- the authenticatorauthenticationResponse- authentication response- Returns:
- the view for the register verify form.
-
verifyForm
public org.springframework.web.servlet.ModelAndView verifyForm()Return the view for verify form.- Returns:
- the view for verifyForm.
-
verifyForm
Return the view for verify form.- Parameters:
response- the authentication response- Returns:
- the view for verifyForm.
-
oktaVerifyViaChannelDataForm
public org.springframework.web.servlet.ModelAndView oktaVerifyViaChannelDataForm(Authenticator.Factor factor, javax.servlet.http.HttpSession session) Return the view for okta verify form via channel data.- Parameters:
factor- the factorsession- the session- Returns:
- the view for okta verify form via channel data.
-
setupOktaVerifyForm
public org.springframework.web.servlet.ModelAndView setupOktaVerifyForm(javax.servlet.http.HttpSession session) Return the view for okta verify form.- Parameters:
session- the session- Returns:
- the view for okta verify form.
-
verifyWebauthn
public org.springframework.web.servlet.ModelAndView verifyWebauthn(AuthenticationResponse enrollResponse) Return the view for verify form.- Parameters:
enrollResponse- the enrollment response- Returns:
- the view for verifyForm.
-