@Test public void shouldInitiateAuthenticationViaGET5() throws AuthLoginException, L10NMessageImpl, JSONException, IOException { HttpHeaders headers = mock(HttpHeaders.class); HttpServletRequest request = mock(HttpServletRequest.class); HttpServletResponse httpResponse = mock(HttpServletResponse.class); String authIndexType = "UNKNOWN"; String indexValue = null; String sessionUpgradeSSOTokenId = null; Response response = restAuthenticationHandler.initiateAuthentication(headers, request, httpResponse, authIndexType, indexValue, sessionUpgradeSSOTokenId); assertEquals(response.getStatus(), 400); ObjectMapper objectMapper = new ObjectMapper(); JsonValue jsonValue = new JsonValue(objectMapper.readValue((String) response.getEntity(), Map.class)); assertEquals(jsonValue.size(), 1); assertTrue(jsonValue.isDefined("errorMessage")); }
public Response initiateAuthentication(HttpHeaders headers, HttpServletRequest request, HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId) { return authenticate(headers, request, response, null, authIndexType, indexValue, sessionUpgradeSSOTokenId); }
RestAuthenticationHandler { public Response initiateAuthentication(HttpHeaders headers, HttpServletRequest request, HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId) { return authenticate(headers, request, response, null, authIndexType, indexValue, sessionUpgradeSSOTokenId); } }
RestAuthenticationHandler { public Response initiateAuthentication(HttpHeaders headers, HttpServletRequest request, HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId) { return authenticate(headers, request, response, null, authIndexType, indexValue, sessionUpgradeSSOTokenId); } @Inject  RestAuthenticationHandler(LoginAuthenticator loginAuthenticator,
            RestAuthCallbackHandlerManager restAuthCallbackHandlerManager,
            AMAuthErrorCodeResponseStatusMapping amAuthErrorCodeResponseStatusMapping, AuthIdHelper authIdHelper); }
RestAuthenticationHandler { public Response initiateAuthentication(HttpHeaders headers, HttpServletRequest request, HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId) { return authenticate(headers, request, response, null, authIndexType, indexValue, sessionUpgradeSSOTokenId); } @Inject  RestAuthenticationHandler(LoginAuthenticator loginAuthenticator,
            RestAuthCallbackHandlerManager restAuthCallbackHandlerManager,
            AMAuthErrorCodeResponseStatusMapping amAuthErrorCodeResponseStatusMapping, AuthIdHelper authIdHelper); Response initiateAuthentication(HttpHeaders headers, HttpServletRequest request,
            HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId); Response continueAuthentication(HttpHeaders headers, HttpServletRequest request,
            HttpServletResponse response, JsonValue postBody, String sessionUpgradeSSOTokenId); }
RestAuthenticationHandler { public Response initiateAuthentication(HttpHeaders headers, HttpServletRequest request, HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId) { return authenticate(headers, request, response, null, authIndexType, indexValue, sessionUpgradeSSOTokenId); } @Inject  RestAuthenticationHandler(LoginAuthenticator loginAuthenticator,
            RestAuthCallbackHandlerManager restAuthCallbackHandlerManager,
            AMAuthErrorCodeResponseStatusMapping amAuthErrorCodeResponseStatusMapping, AuthIdHelper authIdHelper); Response initiateAuthentication(HttpHeaders headers, HttpServletRequest request,
            HttpServletResponse response, String authIndexType, String indexValue, String sessionUpgradeSSOTokenId); Response continueAuthentication(HttpHeaders headers, HttpServletRequest request,
            HttpServletResponse response, JsonValue postBody, String sessionUpgradeSSOTokenId);  }