Class RestAuthenticationHandler
- java.lang.Object
-
- org.forgerock.openam.core.rest.authn.RestAuthenticationHandler
-
public class RestAuthenticationHandler extends Object
Handles the initial authenticate and subsequent callback submit RESTful calls.
-
-
Constructor Summary
Constructors Constructor Description RestAuthenticationHandler(LoginAuthenticator loginAuthenticator, RestAuthCallbackHandlerManager restAuthCallbackHandlerManager, AMAuthErrorCodeResponseStatusMapping amAuthErrorCodeResponseStatusMapping, AuthIdHelper authIdHelper, CoreWrapper coreWrapper, CoreServicesWrapper coreServicesWrapper)Constructs an instance of the RestAuthenticationHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.forgerock.json.JsonValuecontinueAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.forgerock.json.JsonValue postBody, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId)Handles authentication requests from HTTP POST.org.forgerock.json.JsonValueinitiateAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId)Handles authentication requests from HTTP both GET and POST.
-
-
-
Constructor Detail
-
RestAuthenticationHandler
@Inject public RestAuthenticationHandler(LoginAuthenticator loginAuthenticator, RestAuthCallbackHandlerManager restAuthCallbackHandlerManager, AMAuthErrorCodeResponseStatusMapping amAuthErrorCodeResponseStatusMapping, AuthIdHelper authIdHelper, CoreWrapper coreWrapper, CoreServicesWrapper coreServicesWrapper)
Constructs an instance of the RestAuthenticationHandler.- Parameters:
loginAuthenticator- An instance of the LoginAuthenticator.restAuthCallbackHandlerManager- An instance of the RestAuthCallbackHandlerManager.amAuthErrorCodeResponseStatusMapping- An instance of the AMAuthErrorCodeResponseStatusMapping.authIdHelper- An instance of the AuthIdHelper.coreWrapper- An instance of the CoreWrapper.
-
-
Method Detail
-
initiateAuthentication
public org.forgerock.json.JsonValue initiateAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId) throws RestAuthExceptionHandles authentication requests from HTTP both GET and POST. Will then either create the Login Process, as the request will be a new authentication request.- Parameters:
request- The HttpServletRequest.response- The HttpServletResponse.authIndexType- The authentication index type.indexValue- The authentication index value.sessionUpgradeSSOTokenId- The SSO Token Id of the user's current session, null if not performing a session upgrade.- Returns:
- The Response of the authentication request.
- Throws:
RestAuthException
-
continueAuthentication
public org.forgerock.json.JsonValue continueAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.forgerock.json.JsonValue postBody, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId) throws RestAuthExceptionHandles authentication requests from HTTP POST. Will then either create or retrieve the Login Process, dependent on if the request is a new authentication request or a continuation of one.- Parameters:
request- The HttpServletRequest.response- The HttpServletResponse.postBody- The JsonValue post body of the request.sessionUpgradeSSOTokenId- The SSO Token Id of the user's current session, null if not performing a session upgrade.- Returns:
- The Response of the authentication request.
- Throws:
RestAuthException
-
-