Package com.okta.spring.example.helpers
Class ResponseHandler
- java.lang.Object
-
- com.okta.spring.example.helpers.ResponseHandler
-
@Component public final class ResponseHandler extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ResponseHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.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 authenticator)Return the view for verify form.org.springframework.web.servlet.ModelAndViewregisterVerifyForm(Authenticator.Factor factor)Return the view for register verify form.org.springframework.web.servlet.ModelAndViewselectAuthenticatorForm(AuthenticationResponse response, java.lang.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.ModelAndViewverifyForm()Return the view for verify form.org.springframework.web.servlet.ModelAndViewverifyForm(AuthenticationResponse response)Return the view for verify form.
-
-
-
Method Detail
-
needsToShowErrors
public boolean needsToShowErrors(AuthenticationResponse response)
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, java.lang.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)
Return the view for register verify form.- Parameters:
factor- the factor- Returns:
- the view for the register verify form.
-
registerVerifyForm
public org.springframework.web.servlet.ModelAndView registerVerifyForm(Authenticator authenticator)
Return the view for verify form.- Parameters:
authenticator- the authenticator- 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
public org.springframework.web.servlet.ModelAndView verifyForm(AuthenticationResponse response)
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.
-
-