@Test void testMissingParameters() { RequestHandler requestHandler = new RequestHandler(mockSessionStore, mockConfigHolder, mockServiceProviderConfig); RequestProcessingException requestProcessingException = Assertions.assertThrows(RequestProcessingException.class, () -> requestHandler.handleSAMLRequest(null, null, true)); Assertions.assertEquals(requestProcessingException.getCause().getClass(), ErrorCodeException.class); requestProcessingException = Assertions.assertThrows(RequestProcessingException.class, () -> requestHandler.handleSAMLRequest(null, null, false)); Assertions.assertEquals(requestProcessingException.getCause().getClass(), ErrorCodeException.class); requestProcessingException = Assertions.assertThrows(RequestProcessingException.class, () -> requestHandler.handleSAMLRequest(RELAY_STATE, null, true)); Assertions.assertEquals(requestProcessingException.getCause().getClass(), ErrorCodeException.class); requestProcessingException = Assertions.assertThrows(RequestProcessingException.class, () -> requestHandler.handleSAMLRequest(RELAY_STATE, null, false)); Assertions.assertEquals(requestProcessingException.getCause().getClass(), ErrorCodeException.class); requestProcessingException = Assertions.assertThrows(RequestProcessingException.class, () -> requestHandler.handleSAMLRequest("", "", true)); Assertions.assertEquals(requestProcessingException.getCause().getClass(), SAXParseException.class); requestProcessingException = Assertions.assertThrows(RequestProcessingException.class, () -> requestHandler.handleSAMLRequest("", "", false)); Assertions.assertEquals(requestProcessingException.getCause().getClass(), SAXParseException.class); requestProcessingException = Assertions.assertThrows(RequestProcessingException.class, () -> requestHandler.handleSAMLRequest(RELAY_STATE, "", true)); Assertions.assertEquals(requestProcessingException.getCause().getClass(), SAXParseException.class); requestProcessingException = Assertions.assertThrows(RequestProcessingException.class, () -> requestHandler.handleSAMLRequest(RELAY_STATE, "", false)); Assertions.assertEquals(requestProcessingException.getCause().getClass(), SAXParseException.class); }
String handleSAMLRequest(String samlRequestBase64, boolean isPost) { return handleSAMLRequest(null, samlRequestBase64, isPost); }
RequestHandler { String handleSAMLRequest(String samlRequestBase64, boolean isPost) { return handleSAMLRequest(null, samlRequestBase64, isPost); } }
RequestHandler { String handleSAMLRequest(String samlRequestBase64, boolean isPost) { return handleSAMLRequest(null, samlRequestBase64, isPost); } RequestHandler(SessionStore store,
                        ConfigHolder configHolder,
                        ServiceProviderConfig serviceProviderConfig); }
RequestHandler { String handleSAMLRequest(String samlRequestBase64, boolean isPost) { return handleSAMLRequest(null, samlRequestBase64, isPost); } RequestHandler(SessionStore store,
                        ConfigHolder configHolder,
                        ServiceProviderConfig serviceProviderConfig); String handleSAMLRequest(String relayState, String samlRequestBase64, boolean isPost); String getTcTokenURL(String sessionId); }
RequestHandler { String handleSAMLRequest(String samlRequestBase64, boolean isPost) { return handleSAMLRequest(null, samlRequestBase64, isPost); } RequestHandler(SessionStore store,
                        ConfigHolder configHolder,
                        ServiceProviderConfig serviceProviderConfig); String handleSAMLRequest(String relayState, String samlRequestBase64, boolean isPost); String getTcTokenURL(String sessionId); static final String CANNOT_PARSE_SAML_REQUEST; }