Class OIDCRPFlowPreRedirectTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.springframework.webflow.test.execution.AbstractFlowExecutionTests
-
- org.springframework.webflow.test.execution.AbstractExternalizedFlowExecutionTests
-
- net.shibboleth.idp.plugin.authn.test.spring.CustomAbstractXmlFlowExecutionTests
-
- net.shibboleth.idp.plugin.authn.test.flow.AbstractAuthnXmlFlowExecutionTests
-
- net.shibboleth.idp.plugin.authn.oidc.rp.impl.OIDCRPFlowTest
-
- net.shibboleth.idp.plugin.authn.oidc.rp.impl.OIDCRPFlowPreRedirectTest
-
- All Implemented Interfaces:
junit.framework.Test
public class OIDCRPFlowPreRedirectTest extends OIDCRPFlowTest
RP Flow tests for flows actions that build the authentication request before being redirected to the OP. Uses configuration from the loaded XML configuration files — unlikeOIDCRPFlowFromAuthenticationResponseTestwhich needs to build the configuration programatically because the initial seeding of the configuration only happens pre-authn redirect.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.-
Fields inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.impl.OIDCRPFlowTest
CLIENT_ID, CLIENT_SECRET, FLOW, flowResources, GOOD_PROVIDER_CONFIGURATION_INFO, GOOD_PROVIDER_CONFIGURATION_INFO_USE_REQUEST_OBJECT, GOOD_PROVIDER_CONFIGURATION_INFO_USE_REQUEST_OBJECT_ENCRYPT, GOOD_PROVIDER_CONFIGURATION_INFO_USE_REQUEST_OBJECT_HS512_SIG, GOOD_PROVIDER_CONFIGURATION_INFO_USE_REQUEST_OBJECT_RSA256_SIG, OP_ISSUER_ID, OP_ISSUER_ID_REQUESTOBJECT_TRUE, OP_ISSUER_ID_REQUESTOBJECT_TRUE_ENCRYPT, OP_ISSUER_ID_REQUESTOBJECT_TRUE_HS512_SIG, OP_ISSUER_ID_REQUESTOBJECT_TRUE_RSA256_SIG, REDIRECT_URI_OVERRIDE, REMOTE_JWKSET_RESPONSE, subflows
-
Fields inherited from class net.shibboleth.idp.plugin.authn.test.flow.AbstractAuthnXmlFlowExecutionTests
externalContext, mockRequest, mockResponse
-
-
Constructor Summary
Constructors Constructor Description OIDCRPFlowPreRedirectTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestFail_UsingRequestObject_UnsupportedSignatureAlgorithm()Test the flow to the authorization redirect using an OP who's RP config in XML is set to use a request object.voidtestFlowToAuthorizationRedirect()Test the flow running to the authorization redirect using default, basic, settings.voidtestUsingRequestObject()Test the flow to the authorization redirect using an OP whose RP config in XML is set to use a request object.voidtestUsingRequestObject_RSA256Signature()Test the flow to the authorization redirect using an OP who's RP config in XML is set to use a request object.voidtestUsingRequestObject_WithEncryption()Test the flow to the authorization redirect using an OP whose RP config in XML is set to use a request object, and the RP is configured to create a JWE request object.voidtestWithACRs()Test the flow to the authorization redirect and add an authentication context class requested principal.-
Methods inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.impl.OIDCRPFlowTest
addACRAndAMRFunctions, assertEndUserClaimsVerified, assertFlowEndedInErrorConditions, assertFlowEndedInErrorConditions, assertIdTokenSignatureAndClaimsVerified, assertPlainJSONObjectUserInfoToken, assertPreviousEventContextError, assertStandardAuthenticationRedirectFlowSuccessConditions, assertStandardEndFlowSuccessConditions, assertStandardEndUserClaimsSuccessCondition, assertStandardIdTokenClaimsSuccessCondition, assertStandardRequestObjectSuccessConditions, assertUserInfoTokenSignatureVerified, buildProfileRequestContext, createAuthenticationRequest, createAuthenticationResponse, createBasicSecurityConfigAndValidationParams, createOAuth2ClientContext, createPeerContext, createSimpleServer, getRelyingPartyProfileConfig, populateBasicContextTreeFromAuthnResponse, registerMockBeanDefinitions, registerMockPropertySource
-
Methods inherited from class net.shibboleth.idp.plugin.authn.test.flow.AbstractAuthnXmlFlowExecutionTests
addBeanDefinition, addBeanSingleton, addHttpBasicAuthHeader, configureFlowBuilderContext, getModelResources, getResource, loadBeanDefinitionsFromXmlFile, setFlowModelResources, setFlowPath, setMockProperties, setSubflows, setUp
-
Methods inherited from class net.shibboleth.idp.plugin.authn.test.spring.CustomAbstractXmlFlowExecutionTests
createFlowBuilder, registerMockFlowBeans
-
Methods inherited from class org.springframework.webflow.test.execution.AbstractExternalizedFlowExecutionTests
buildFlow, createResourceLoader, getFlow, getFlowDefinition, getFlowDefinitionRegistry, getResourceFactory, isCacheFlowDefinition, setCacheFlowDefinition, setFlowExecutionAttributes, setFlowExecutionListener, setFlowExecutionListeners
-
Methods inherited from class org.springframework.webflow.test.execution.AbstractFlowExecutionTests
assertActiveFlowEquals, assertCurrentStateEquals, assertFlowExecutionActive, assertFlowExecutionEnded, assertFlowExecutionOutcomeEquals, assertResponseWrittenEquals, createFlowExecutionFactory, getConversationAttribute, getConversationScope, getFlowAttribute, getFlowExecution, getFlowExecutionFactory, getFlowExecutionOutcome, getFlowScope, getRequiredConversationAttribute, getRequiredConversationAttribute, getRequiredFlowAttribute, getRequiredFlowAttribute, getRequiredViewAttribute, getRequiredViewAttribute, getViewAttribute, getViewScope, resumeFlow, setCurrentState, startFlow, startFlow, updateFlowExecution
-
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, runBare, runTest, setName, tearDown, toString
-
-
-
-
Method Detail
-
testFlowToAuthorizationRedirect
public void testFlowToAuthorizationRedirect() throws ExceptionTest the flow running to the authorization redirect using default, basic, settings.- Throws:
Exception- on error.
-
testUsingRequestObject
public void testUsingRequestObject() throws ExceptionTest the flow to the authorization redirect using an OP whose RP config in XML is set to use a request object. The request object will be signed by not encrypted by default.- Throws:
Exception- on error.
-
testUsingRequestObject_WithEncryption
public void testUsingRequestObject_WithEncryption() throws ExceptionTest the flow to the authorization redirect using an OP whose RP config in XML is set to use a request object, and the RP is configured to create a JWE request object.- Throws:
Exception- on error.
-
testUsingRequestObject_RSA256Signature
public void testUsingRequestObject_RSA256Signature() throws ExceptionTest the flow to the authorization redirect using an OP who's RP config in XML is set to use a request object. Configuration restricts the OP to only accepting RS256 signed request objects. So the RP must choose that.- Throws:
Exception- on error.
-
testFail_UsingRequestObject_UnsupportedSignatureAlgorithm
public void testFail_UsingRequestObject_UnsupportedSignatureAlgorithm() throws ExceptionTest the flow to the authorization redirect using an OP who's RP config in XML is set to use a request object. The OP and RP do not support the same set of signature algorithms, so this should fail.- Throws:
Exception- on error.
-
-