public class AuthenticationResourceTest extends RestCrowdServiceAcceptanceTestCase
ADMIN_PASSWORD, ADMIN_USERNAME, APPLICATION_NAME, APPLICATION_PASSWORD, ATTRIBUTES_RESOURCE, AUTHENTICATION_RESOURCE, EEEEP_PASSWORD, EEEEP_USERNAME, EVENTS_RESOURCE, GROUP_BADGERS, GROUP_BADGERS_DESCRIPTION, GROUP_CROWD_ADMINS, GROUP_CROWD_TESTERS, GROUP_CROWD_USERS, GROUPS_RESOURCE, MT, NON_ADMIN_USER_NAME, NON_ADMIN_USER_PASSWORD, NON_CROWD_USER_PASSWORD, NON_CROWD_USER_USERNAME, NON_EXISTENT_GROUP, NON_EXISTENT_USER, PENNY_USERNAME, REST_SERVICE_NAME, restServer, SECOND_ADMIN_PASSWORD, SECOND_ADMIN_USERNAME, SESSION_RESOURCE, USERNAME_PARAM, USERS_RESOURCE, WEBHOOKS_RESOURCE
Constructor and Description |
---|
AuthenticationResourceTest(String name)
Constructs a test case with the given name.
|
AuthenticationResourceTest(String name,
RestServer restServer)
Constructs a test case with the given name, using the given RestServer.
|
Modifier and Type | Method and Description |
---|---|
void |
testAuthenticationNotify_shouldErrorIfNotAllowedToLogin() |
void |
testAuthenticationNotify_shouldProcessDefaultGroups() |
void |
testAuthenticationNotify_shouldRequireAuth() |
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.
|
void |
testUserAuthentication_BadCredentials()
Tests that the Authentication resource will return a 400 (Bad Request) status if the user authentication details
are incorrect.
|
void |
testUserAuthentication_CommonUserUnauthorised()
Tests that the Authentication resource will only authenticate the first user that it finds with the specified
username.
|
void |
testUserAuthentication_InactiveUser()
Tests that the Authentication resource will return a 400 (Bad Request) status if the user is inactive.
|
void |
testUserAuthentication_NestedUser()
Tests that the Authentication resource will successfully authenticate a nested user.
|
void |
testUserAuthentication_NoUser()
Tests that the Authentication resource will return a 400 (Bad Request) status if there is no such user.
|
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.
|
void |
testUserAuthentication()
Tests that the Authentication resource correctly authenticates a valid user.
|
authenticateUser, authenticateUser, deactivateUser, getBaseUriBuilder, getBaseUriBuilder, getBaseUriBuilder, getRootWebResource, getServerUriBuilder, getWebResource, getWebResource, requestEvents, requestEventToken, setRestServer, setUp, tearDown
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public AuthenticationResourceTest(String name)
name
- the test namepublic AuthenticationResourceTest(String name, RestServer restServer)
name
- the test namerestServer
- the RestServerpublic void testUserAuthentication()
public void testUserAuthentication_BadCredentials()
public void testUserAuthentication_InactiveUser()
public void testUserAuthentication_NoUser()
public void testUserAuthentication_UnauthorisedGroupUser()
public void testUserAuthentication_AllowAllToAuthenticate()
public void testUserAuthentication_CommonUserUnauthorised()
public void testUserAuthentication_NestedUser()
public void testAuthenticationNotify_shouldProcessDefaultGroups()
public void testAuthenticationNotify_shouldErrorIfNotAllowedToLogin()
public void testAuthenticationNotify_shouldRequireAuth()
Copyright © 2019 Atlassian. All rights reserved.