com.atlassian.crowd.acceptance.tests.applications.crowdid.client
Class OpenIDAuthenticationTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sourceforge.jwebunit.junit.WebTestCase
              extended by com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
                  extended by com.atlassian.crowd.acceptance.tests.ApplicationAcceptanceTestCase
                      extended by com.atlassian.crowd.acceptance.tests.applications.crowdid.client.CrowdIDClientAcceptanceTestCase
                          extended by com.atlassian.crowd.acceptance.tests.applications.crowdid.client.OpenIDAuthenticationTest
All Implemented Interfaces:
junit.framework.Test

public class OpenIDAuthenticationTest
extends CrowdIDClientAcceptanceTestCase

This class contains tests which examine the authentication process between the crowd-openid-client and crowd-openid-server. The openid server retrieves user data from the crowd-console. It is a 3-webapp test that currently tests basic forms of OpenID authentication + SREG exchange.


Field Summary
protected  String OPENID_SERVER_URL
           
protected  String OPENIDSERVER_LOGIN_URL_ADMIN
           
protected static String SERVER_NAME
           
 
Fields inherited from class com.atlassian.crowd.acceptance.tests.ApplicationAcceptanceTestCase
ADMIN_PW, baseUrl, CROWD_ADMIN_EMAIL_ADDRESS, CROWD_ADMIN_FULLNAME, CROWD_ADMIN_USER, CROWD_ADMINISTRATORS_GROUP, crowdBaseUrl, crowdConsole, crowdResourceBundle, specProperties
 
Fields inherited from class net.sourceforge.jwebunit.junit.WebTestCase
customTester, tester
 
Constructor Summary
OpenIDAuthenticationTest()
           
 
Method Summary
protected  void assertAtClientLoginPage()
           
protected  void assertAtClientProfilePage(String serverUrl, String userName, String email, String userFullName)
           
protected  void assertAtServerAllowDenyPage(String clientUrl, String serverUrl, String nickName, String fullName, String email)
           
protected  void assertAtServerLoginPage()
           
 void setUp()
           
 void tearDownApprovedSitesForAdmin()
          Remove any 'Allow Always' approvals.
 void testAbleToAuthenticateWithPlusInUsername()
           
 void testOpenIDAuthenticationAllow()
           
 void testOpenIDAuthenticationDeny()
           
 void testOpenIDAuthenticationFailsWhenUsernamePaddedBeforeFinalSlash()
           
 void testOpenIDAuthenticationImmediate_fail()
           
 void testOpenIDAuthenticationImmediateSucceedsAfterAllowAlwaysApproval()
           
 void testOpenIDAuthenticationStateless()
           
 void testOpenIDClientShouldWorkWithUrlInEncodedFormat()
           
 void testOpenIDClientShouldWorkWithUrlsWhichContainUTF8Characters()
           
 void testOpenIDTrimsUrlsBeforeAuthenticatingRequest()
           
 void testRequiredAttribsCorrectlyEscaped()
           
 void testServerSelectsIdentityForLoggedInUserWhenImmediateCheckIsMade()
           
 void testServerSelectsIdentityForLoggedInUserWhenOpEndpointIsProvided()
           
 void testServerSelectsIdentityForLoggedInUserWhenOpEndpointIsProvidedWithNonAdminUser()
           
 
Methods inherited from class com.atlassian.crowd.acceptance.tests.applications.crowdid.client.CrowdIDClientAcceptanceTestCase
getApplicationName, getLocalTestPropertiesFileName, getResourceBundleName
 
Methods inherited from class com.atlassian.crowd.acceptance.tests.ApplicationAcceptanceTestCase
getBaseUrl, getCrowdHome, getCurrentlyLoggedInCrowdUserFullName, getTestProperty, intendToModifyData, loginToCrowd, loginToCrowd, logoutFromCrowd, restoreBaseSetup, restoreCrowdFromXML, tearDown, useApp, useCrowd, verifyGroupDoesNotExistInCrowd, verifyGroupDoesNotExistInCrowdWithCaseSensitiveName, verifyGroupExistsInCrowd, verifyUserDoesNotExistInCrowd, verifyUserExistsInCrowd
 
Methods inherited from class com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
addRequestHeader, assertErrorNotPresent, assertErrorPresent, assertErrorPresentWithKey, assertKeyInElement, assertKeyPresent, assertKeyPresent, assertKeyPresent, assertKeyPresentOnce, assertLinkPresentWithKey, assertServerResponseContains, assertServerResponseDoesNotContain, assertSuccessPresent, assertTextPresent, assertWarningAndErrorNotPresent, assertWarningNotPresent, assertWarningPresent, clickLinkWithKey, getElementTextById, getPageText, isTextPresent, log, scrapeTable, scrapeTable, setRadioButton, setTester, waitFor, waitForElementById, waitForElementByXPath, waitForText, waitForText
 
Methods inherited from class net.sourceforge.jwebunit.junit.WebTestCase
assertButtonNotPresent, assertButtonNotPresentWithText, assertButtonPresent, assertButtonPresentWithText, assertCheckboxNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertCommentNotPresent, assertCommentPresent, assertCookiePresent, assertCookieValueEquals, assertCookieValueMatch, assertDownloadedFileEquals, assertElementNotPresent, assertElementNotPresentByXPath, assertElementPresent, assertElementPresentByXPath, assertFormElementEmpty, assertFormElementEquals, assertFormElementMatch, assertFormElementNotPresent, assertFormElementPresent, assertFormNotPresent, assertFormNotPresent, assertFormPresent, assertFormPresent, assertFramePresent, assertHeaderEquals, assertHeaderMatches, assertHeaderNotPresent, assertHeaderPresent, assertHiddenFieldPresent, assertImagePresent, assertImagePresentPartial, assertImageValid, assertImageValidAndStore, assertKeyInTable, assertKeyInTable, assertKeyNotInTable, assertKeyNotPresent, assertKeyNotPresent, assertKeyPresent, assertKeysInTable, assertKeysInTable, assertLabeledFieldEquals, assertLabelMatches, assertLabelPresent, assertLinkNotPresent, assertLinkNotPresentWithExactText, assertLinkNotPresentWithExactText, assertLinkNotPresentWithImage, assertLinkNotPresentWithImage, assertLinkNotPresentWithText, assertLinkNotPresentWithText, assertLinkPresent, assertLinkPresentWithExactText, assertLinkPresentWithExactText, assertLinkPresentWithImage, assertLinkPresentWithImage, assertLinkPresentWithText, assertLinkPresentWithText, assertMatch, assertMatch, assertMatch, assertMatchInElement, assertMatchInTable, assertMatchInTable, assertNoMatch, assertNoMatchInElement, assertNoMatchInTable, assertNoMatchInTable, assertNotMatch, assertNotMatch, assertRadioOptionNotPresent, assertRadioOptionNotSelected, assertRadioOptionPresent, assertRadioOptionSelected, assertResetButtonNotPresent, assertResetButtonNotPresent, assertResetButtonPresent, assertResetButtonPresent, assertResponseCode, assertResponseCodeBetween, assertSelectedOptionEquals, assertSelectedOptionEquals, assertSelectedOptionMatches, assertSelectedOptionMatches, assertSelectedOptionsEqual, assertSelectedOptionsEqual, assertSelectedOptionsMatch, assertSelectedOptionsMatch, assertSelectedOptionValueEquals, assertSelectedOptionValueEquals, assertSelectedOptionValuesEqual, assertSelectedOptionValuesEqual, assertSelectOptionNotPresent, assertSelectOptionNotPresent, assertSelectOptionPresent, assertSelectOptionPresent, assertSelectOptionsEqual, assertSelectOptionsEqual, assertSelectOptionsNotEqual, assertSelectOptionsNotEqual, assertSelectOptionsPresent, assertSelectOptionsPresent, assertSelectOptionValueNotPresent, assertSelectOptionValueNotPresent, assertSelectOptionValuePresent, assertSelectOptionValuePresent, assertSelectOptionValuesEqual, assertSelectOptionValuesEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesPresent, assertSelectOptionValuesPresent, assertSubmitButtonNotPresent, assertSubmitButtonNotPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertTableEquals, assertTableEquals, assertTableMatch, assertTableMatch, assertTableNotPresent, assertTablePresent, assertTableRowCountEquals, assertTableRowsEqual, assertTableRowsEqual, assertTableRowsMatch, assertTableRowsMatch, assertTextFieldEquals, assertTextInElement, assertTextInTable, assertTextInTable, assertTextNotInElement, assertTextNotInTable, assertTextNotInTable, assertTextNotPresent, assertTextPresent, assertTitleEquals, assertTitleEqualsKey, assertTitleEqualsKey, assertTitleMatch, assertTitleNotEquals, assertTitleNotSame, assertWindowCountEquals, assertWindowPresent, assertWindowPresent, assertWindowPresentWithTitle, beginAt, checkCheckbox, checkCheckbox, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkWithExactText, clickLinkWithExactText, clickLinkWithImage, clickLinkWithImage, clickLinkWithText, clickLinkWithText, clickRadioOption, closeBrowser, closeWindow, dumpCookies, dumpHtml, dumpHtml, dumpTable, dumpTable, getAllHeaders, getComments, getDialog, getElementAttributByXPath, getElementAttributeByXPath, getElementById, getElementByXPath, getElementsByXPath, getElementTextByXPath, getFieldsForLabel, getFormElementValue, getHeader, getImage, getLabeledFieldValue, getMessage, getMessage, getPageSource, getResponseHeaders, getServerResponse, getServeurResponse, getTable, getTestContext, getTester, getTestingEngine, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, reset, runBare, saveAs, selectOption, selectOption, selectOptionByValue, selectOptionByValue, selectOptions, selectOptions, selectOptionsByValues, selectOptionsByValues, setBaseUrl, setBaseUrl, setDialog, setExpectedJavaScriptAlert, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setExpectedJavaScriptPrompt, setFormElement, setHiddenField, setIgnoreFailingStatusCodes, setLabeledFormElementField, setScriptingEnabled, setTestContext, setTestingEngineKey, setTextField, setTimeout, setWorkingForm, setWorkingForm, setWorkingForm, submit, submit, submit, uncheckCheckbox, uncheckCheckbox
 
Methods inherited from class junit.framework.TestCase
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, runTest, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPENIDSERVER_LOGIN_URL_ADMIN

protected String OPENIDSERVER_LOGIN_URL_ADMIN

OPENID_SERVER_URL

protected String OPENID_SERVER_URL

SERVER_NAME

protected static final String SERVER_NAME
See Also:
Constant Field Values
Constructor Detail

OpenIDAuthenticationTest

public OpenIDAuthenticationTest()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class ApplicationAcceptanceTestCase
Throws:
Exception

tearDownApprovedSitesForAdmin

public void tearDownApprovedSitesForAdmin()
Remove any 'Allow Always' approvals.


assertAtClientLoginPage

protected void assertAtClientLoginPage()

assertAtServerLoginPage

protected void assertAtServerLoginPage()

assertAtServerAllowDenyPage

protected void assertAtServerAllowDenyPage(String clientUrl,
                                           String serverUrl,
                                           String nickName,
                                           String fullName,
                                           String email)

assertAtClientProfilePage

protected void assertAtClientProfilePage(String serverUrl,
                                         String userName,
                                         String email,
                                         String userFullName)

testOpenIDAuthenticationAllow

public void testOpenIDAuthenticationAllow()

testOpenIDAuthenticationDeny

public void testOpenIDAuthenticationDeny()

testOpenIDAuthenticationFailsWhenUsernamePaddedBeforeFinalSlash

public void testOpenIDAuthenticationFailsWhenUsernamePaddedBeforeFinalSlash()

testOpenIDAuthenticationStateless

public void testOpenIDAuthenticationStateless()

testOpenIDAuthenticationImmediate_fail

public void testOpenIDAuthenticationImmediate_fail()

testOpenIDAuthenticationImmediateSucceedsAfterAllowAlwaysApproval

public void testOpenIDAuthenticationImmediateSucceedsAfterAllowAlwaysApproval()

testOpenIDClientShouldWorkWithUrlsWhichContainUTF8Characters

public void testOpenIDClientShouldWorkWithUrlsWhichContainUTF8Characters()
                                                                  throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

testOpenIDClientShouldWorkWithUrlInEncodedFormat

public void testOpenIDClientShouldWorkWithUrlInEncodedFormat()
                                                      throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

testOpenIDTrimsUrlsBeforeAuthenticatingRequest

public void testOpenIDTrimsUrlsBeforeAuthenticatingRequest()

testServerSelectsIdentityForLoggedInUserWhenOpEndpointIsProvided

public void testServerSelectsIdentityForLoggedInUserWhenOpEndpointIsProvided()

testServerSelectsIdentityForLoggedInUserWhenOpEndpointIsProvidedWithNonAdminUser

public void testServerSelectsIdentityForLoggedInUserWhenOpEndpointIsProvidedWithNonAdminUser()

testServerSelectsIdentityForLoggedInUserWhenImmediateCheckIsMade

public void testServerSelectsIdentityForLoggedInUserWhenImmediateCheckIsMade()

testRequiredAttribsCorrectlyEscaped

public void testRequiredAttribsCorrectlyEscaped()
                                         throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

testAbleToAuthenticateWithPlusInUsername

public void testAbleToAuthenticateWithPlusInUsername()
                                              throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException


Copyright © 2013 Atlassian. All Rights Reserved.