Class WebSecurityPasswordBasedBase

java.lang.Object
org.jboss.as.test.integration.security.WebSecurityPasswordBasedBase

public abstract class WebSecurityPasswordBasedBase extends Object
Base class for web security tests that are based on passwords
Author:
Anil Saldhana
  • Constructor Details

    • WebSecurityPasswordBasedBase

      public WebSecurityPasswordBasedBase()
  • Method Details

    • testPasswordBasedSuccessfulAuth

      public void testPasswordBasedSuccessfulAuth() throws Exception
      Test with user "anil" who has the right password and the right role to access the servlet
      Throws:
      Exception
    • testPasswordBasedUnsuccessfulAuth

      public void testPasswordBasedUnsuccessfulAuth() throws Exception

      Test with user "marcus" who has the right password but does not have the right role

      Should be a HTTP/403

      Throws:
      Exception
    • makeCall

      protected abstract void makeCall(String user, String pass, int expectedCode) throws Exception
      Method that needs to be overridden with the HTTPClient code
      Parameters:
      user - username
      pass - password
      expectedCode - http status code
      Throws:
      Exception