public class SAMLAuthTest extends CrowdAcceptanceTestCase
This tests the SAML Authentication interaction but does not rigorously examine the actual response message sent back to Google.

Please see the TestSAMLMessageManagerImpl for response testing.

In place of the Google server, we use the 500.jsp page as our "mock Google" response recipient and use GET requests as our "mock Google" request generator.

Both SSO and sign-in-after-login workflows are tested.

  • Field Details

  • Constructor Details

    • SAMLAuthTest

      public SAMLAuthTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Overrides:
      setUp in class CrowdAcceptanceTestCase
      Throws:
      Exception
    • forgeGoogleRequestExpectingFailure

      protected void forgeGoogleRequestExpectingFailure() throws IOException
      Throws:
      IOException
    • forgeGoogleRequest

      protected io.restassured.response.Response forgeGoogleRequest() throws IOException
      Throws:
      IOException
    • forgeInvalidGoogleRequest

      protected void forgeInvalidGoogleRequest()
    • ensureNoKeysPresent

      protected void ensureNoKeysPresent()
    • ensureKeysPresent

      protected void ensureKeysPresent()
    • authWithNoKeysSetup

      public void authWithNoKeysSetup() throws IOException
      Throws:
      IOException
    • authWithGarbageRequest

      public void authWithGarbageRequest()
    • authSuccessSSO

      public void authSuccessSSO() throws IOException
      Throws:
      IOException
    • authSuccessAfterLogin

      public void authSuccessAfterLogin() throws IOException, URISyntaxException
      Throws:
      IOException
      URISyntaxException
    • verifySAMLResponse

      protected void verifySAMLResponse()
    • generatedRequestParameterDecodes

      public void generatedRequestParameterDecodes() throws Exception
      Self sanity check that we're generating properly encoded requests.
      Throws:
      Exception