Class RegistrationFlowTest
- java.lang.Object
-
- org.springframework.test.context.testng.AbstractTestNGSpringContextTests
-
- net.shibboleth.idp.test.flows.AbstractFlowTest
-
- net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest
-
- net.shibboleth.idp.plugin.oidc.op.profile.flow.RegistrationFlowTest
-
- All Implemented Interfaces:
Aware,ApplicationContextAware,org.testng.IHookable,org.testng.ITestNGListener
public class RegistrationFlowTest extends AbstractOidcFlowTest
Some tests for the dynamic registration flow.
-
-
Field Summary
Fields Modifier and Type Field Description private StringclientIdstatic StringFLOW_IDprivate StringredirectUriprivate StringrpId(package private) StorageServicestorageService-
Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest
ecKey, END_STATE_ID, endStateId, flowId, rsaPrivateKey, rsaPublicKey
-
Fields inherited from class net.shibboleth.idp.test.flows.AbstractFlowTest
builderFactory, certFactoryBean, directoryServer, END_STATE_OUTPUT_ATTR_EXPR, END_STATE_OUTPUT_ATTR_NAME, externalContext, flowExecutor, idGenerator, IDP_ENTITY_ID, idpCredential, IP_ADDRESS_AUTHN_FLOW_ID, IP_ADDRESS_AUTHN_MAP_BEAN_NAME, KEYSTORE_FILE, LDIF_FILE, marshallerFactory, parserPool, request, response, SAML1_TRANSFORM_C14N_BEAN_NAME, SAML2_TRANSFORM_C14N_BEAN_NAME, SP_ACS_URL, SP_ENTITY_ID, SP_RELAY_STATE, spCredential, unmarshallerFactory
-
Fields inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
applicationContext, logger
-
-
Constructor Summary
Constructors Constructor Description RegistrationFlowTest()
-
Method Summary
-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest
assertErrorCode, assertErrorDescriptionContains, buildJsonForLegacyToken, buildJWKSet, buildMetadataSkeleton, buildToken, buildToken, buildToken, createEncryptedJWT, createEncryptedJWT, createEncryptedJWT, createPrivateKeyJWT, createPrivateKeyJWT, createPrivateKeyJWT, createSecretJWT, createSecretJWT, generateNewKeyPair, generateNewKeyPair, getDataSealer, initializeECKey, initializeMocks, initializeThreadLocals, initKeys, loadCredential, loadEncryptionCredential, loadES384SigningCredential, loadES512SigningCredential, loadESSigningCredential, loadRSSigningCredential, parseErrorResponse, parseResponse, parseSuccessResponse, removeMetadata, setBasicAuth, setHttpFormRequest, setHttpFormRequest, setJsonRequest, setRequest, setRequest, storeConsent, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadataObject
-
Methods inherited from class net.shibboleth.idp.test.flows.AbstractFlowTest
assertFlowExecutionOutcome, assertFlowExecutionOutcome, assertFlowExecutionResult, assertProfileRequestContext, buildSOAP11Envelope, clearThreadLocals, getFlow, initializeFlowExecutor, initializeXMLObjectSupport, overrideEndStateOutput, overrideEndStateOutput, registerFlowsInParentRegistry, retrieveProfileRequestContext, setupDirectoryServer, teardownDirectoryServer
-
Methods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance
-
-
-
-
Field Detail
-
FLOW_ID
public static final String FLOW_ID
- See Also:
- Constant Field Values
-
redirectUri
private final String redirectUri
- See Also:
- Constant Field Values
-
rpId
private String rpId
-
clientId
private String clientId
-
storageService
@Autowired @Qualifier("shibboleth.StorageService") StorageService storageService
-
-
Method Detail
-
setUp
@BeforeMethod public void setUp()
-
tearDown
@AfterMethod public void tearDown() throws IOException- Throws:
IOException
-
testUnauthenticated_nonCompliantWithProfilePolicy1
public void testUnauthenticated_nonCompliantWithProfilePolicy1()
-
testUnauthenticated_nonCompliantWithProfilePolicy2
public void testUnauthenticated_nonCompliantWithProfilePolicy2()
-
testUnauthenticated_success
public void testUnauthenticated_success() throws Exception- Throws:
Exception
-
testAccessToken_nonCompliantWithProfilePolicy1
public void testAccessToken_nonCompliantWithProfilePolicy1() throws Exception- Throws:
Exception
-
testAccessToken_nonCompliantWithProfilePolicy2
public void testAccessToken_nonCompliantWithProfilePolicy2() throws Exception- Throws:
Exception
-
testAccessToken_success_withClientID
public void testAccessToken_success_withClientID() throws Exception- Throws:
Exception
-
testAccessToken_successReplace
public void testAccessToken_successReplace() throws Exception- Throws:
Exception
-
testAccessToken_NoReplace
public void testAccessToken_NoReplace() throws Exception- Throws:
Exception
-
testAccessToken_successCustomClaimIgnored
public void testAccessToken_successCustomClaimIgnored() throws Exception- Throws:
Exception
-
testAccessToken_successCustomClaimInPolicyAdded
public void testAccessToken_successCustomClaimInPolicyAdded() throws Exception- Throws:
Exception
-
testAccessToken_noPolicyNoRedirectUri
public void testAccessToken_noPolicyNoRedirectUri() throws Exception- Throws:
Exception
-
testAccessToken_nonDefaultPolicyActive_failsWhenIncompatibleRequest
public void testAccessToken_nonDefaultPolicyActive_failsWhenIncompatibleRequest() throws Exception- Throws:
Exception
-
testAccessToken_nonDefaultPolicyActive_successWithCompatibleRequest
public void testAccessToken_nonDefaultPolicyActive_successWithCompatibleRequest() throws Exception- Throws:
Exception
-
assertSuccessfulResponse
protected void assertSuccessfulResponse(FlowExecutionResult result, String clientId) throws Exception
- Throws:
Exception
-
buildRegistrationAccessToken
protected com.nimbusds.oauth2.sdk.token.BearerAccessToken buildRegistrationAccessToken(boolean replacement, String redirectUriSubset, String... additionalPolicyClaims) throws Exception- Throws:
Exception
-
-