Class AuthenticationResourceTest

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.atlassian.crowd.acceptance.tests.rest.service.RestCrowdServiceAcceptanceTestCase
com.atlassian.crowd.acceptance.tests.rest.service.AuthenticationResourceTest
All Implemented Interfaces:
junit.framework.Test

public class AuthenticationResourceTest extends RestCrowdServiceAcceptanceTestCase
Note that this test class is reused in JIRA via inheritance. Please be mindful of that when making changes to this class.
  • Constructor Details

    • AuthenticationResourceTest

      public AuthenticationResourceTest(String name)
      Constructs a test case with the given name.
      Parameters:
      name - the test name
    • AuthenticationResourceTest

      public AuthenticationResourceTest(String name, RestServer restServer)
      Constructs a test case with the given name, using the given RestServer.
      Parameters:
      name - the test name
      restServer - the RestServer
  • Method Details

    • testUserAuthentication

      public void testUserAuthentication()
      Tests that the Authentication resource correctly authenticates a valid user.
    • testUserAuthentication_BadCredentials

      public void testUserAuthentication_BadCredentials()
      Tests that the Authentication resource will return a 400 (Bad Request) status if the user authentication details are incorrect.
    • testUserAuthentication_InactiveUser

      public void testUserAuthentication_InactiveUser()
      Tests that the Authentication resource will return a 400 (Bad Request) status if the user is inactive.
    • testUserAuthentication_NoUser

      public void testUserAuthentication_NoUser()
      Tests that the Authentication resource will return a 400 (Bad Request) status if there is no such user.
    • testUserAuthentication_UnauthorisedGroupUser

      public void testUserAuthentication_UnauthorisedGroupUser()
      Tests that the Authentication resource will return a 400 (Bad Request) status if the authentication for the user is correct but the user is not a member of an authorised group of the application.
    • testUserAuthentication_AllowAllToAuthenticate

      public void testUserAuthentication_AllowAllToAuthenticate()
      Tests that the Authentication resource will successfully authenticate a user that is not explicitly in an authorised group of the application but is in a directory where all the users are allowed to authenticate with the application.
    • testUserAuthentication_CommonUserUnauthorised

      public void testUserAuthentication_CommonUserUnauthorised()
      Tests that the Authentication resource will only authenticate the first user that it finds with the specified username. i.e. even though there is another user in the second directory with a matching username and password, it will only use the credentials of the first user.
    • testUserAuthentication_NestedUser

      public void testUserAuthentication_NestedUser()
      Tests that the Authentication resource will successfully authenticate a nested user.
    • testAuthenticationNotify_shouldProcessDefaultGroups

      public void testAuthenticationNotify_shouldProcessDefaultGroups()
    • testAuthenticationNotify_shouldErrorIfNotAllowedToLogin

      public void testAuthenticationNotify_shouldErrorIfNotAllowedToLogin()
    • testAuthenticationNotify_shouldRequireAuth

      public void testAuthenticationNotify_shouldRequireAuth()