Class AuthorizeFlowTest
- 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.AuthorizeFlowTest
-
- All Implemented Interfaces:
Aware,ApplicationContextAware,IHookable,ITestNGListener
public class AuthorizeFlowTest extends AbstractOidcFlowTest
Tests for the authorize-flow.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) StringclientId(package private) StringclientIdCustomTokens(package private) StringclientIdIssInResponse(package private) StringclientSecretstatic StringFLOW_ID(package private) Stringissuer(package private) StringredirectUri(package private) Stringresource(package private) com.nimbusds.oauth2.sdk.Scopescope(package private) StorageServicestorageService-
Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest
END_STATE_ID
-
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 AuthorizeFlowTest()
-
Method Summary
-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest
assertErrorCode, assertErrorDescriptionContains, buildJsonForLegacyToken, createPrivateKeyJWT, createSecretJWT, getDataSealer, initializeMocks, initializeThreadLocals, parseErrorResponse, parseResponse, parseSuccessResponse, removeMetadata, setBasicAuth, setHttpFormRequest, setJsonRequest, setRequest, storeConsent, storeMetadata, storeMetadata, storeMetadata, storeMetadata, storeMetadata
-
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
-
resource
String resource
-
issuer
String issuer
-
redirectUri
String redirectUri
-
clientId
String clientId
-
clientIdIssInResponse
String clientIdIssInResponse
-
clientIdCustomTokens
String clientIdCustomTokens
-
clientSecret
String clientSecret
-
scope
com.nimbusds.oauth2.sdk.Scope scope
-
storageService
@Autowired @Qualifier("shibboleth.StorageService") StorageService storageService
-
-
Method Detail
-
setup
@BeforeMethod public void setup()
-
testWithAuthorizationCodeFlow
public void testWithAuthorizationCodeFlow() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowAndResource
public void testWithAuthorizationCodeFlowAndResource() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowIssInResponse
public void testWithAuthorizationCodeFlowIssInResponse() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowNoOpenid
public void testWithAuthorizationCodeFlowNoOpenid() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowNoRedirectURI
public void testWithAuthorizationCodeFlowNoRedirectURI() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithImplicitFlowNoNonce
public void testWithImplicitFlowNoNonce() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithImplicitFlow
public void testWithImplicitFlow() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithImplicitFlowIssInResponse
public void testWithImplicitFlowIssInResponse() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithImplicitFlowAndResource
public void testWithImplicitFlowAndResource() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithImplicitTokenFlow
public void testWithImplicitTokenFlow() throws IOException, net.shibboleth.idp.session.SessionException, DataSealerException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionDataSealerExceptionParseException
-
testWithImplicitTokenFlowIssInResponse
public void testWithImplicitTokenFlowIssInResponse() throws IOException, net.shibboleth.idp.session.SessionException, DataSealerException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionDataSealerExceptionParseException
-
testWithImplicitTokenFlowAndResource
public void testWithImplicitTokenFlowAndResource() throws IOException, net.shibboleth.idp.session.SessionException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionParseException
-
testWithImplicitTokenFlowNoNonce
public void testWithImplicitTokenFlowNoNonce() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithImplicitFlowNoOpenIdScope
public void testWithImplicitFlowNoOpenIdScope() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithImplicitFlowNoRedirectURI
public void testWithImplicitFlowNoRedirectURI() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithHybridIdTokenFlow
public void testWithHybridIdTokenFlow() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithHybridIdTokenFlowIssInResponse
public void testWithHybridIdTokenFlowIssInResponse() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithHybridIdTokenFlowAndResource
public void testWithHybridIdTokenFlowAndResource() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithHybridIdTokenFlowNoNonce
public void testWithHybridIdTokenFlowNoNonce() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithHybridTokenFlow
public void testWithHybridTokenFlow() throws IOException, net.shibboleth.idp.session.SessionException, ParseException, DataSealerException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionParseExceptionDataSealerException
-
testWithHybridTokenFlowAndResource
public void testWithHybridTokenFlowAndResource() throws IOException, net.shibboleth.idp.session.SessionException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionParseException
-
testWithHybridIdTokenTokenFlow
public void testWithHybridIdTokenTokenFlow() throws IOException, net.shibboleth.idp.session.SessionException, ParseException, DataSealerException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionParseExceptionDataSealerException
-
testWithHybridIdTokenTokenFlowWithCustomTokenClaim
public void testWithHybridIdTokenTokenFlowWithCustomTokenClaim() throws IOException, net.shibboleth.idp.session.SessionException, ParseException, DataSealerException, com.nimbusds.oauth2.sdk.ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionParseExceptionDataSealerException
-
testWithHybridIdTokenTokenFlowAndResource
public void testWithHybridIdTokenTokenFlowAndResource() throws IOException, net.shibboleth.idp.session.SessionException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionParseException
-
testWithHybridIdTokenTokenFlowNoNonce
public void testWithHybridIdTokenTokenFlowNoNonce() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowUnforcedPKCE
public void testWithAuthorizationCodeFlowUnforcedPKCE() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowForcedPlainPKCEMissingChallenge
public void testWithAuthorizationCodeFlowForcedPlainPKCEMissingChallenge() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowForcedPlainPKCEUnknownChallenge
public void testWithAuthorizationCodeFlowForcedPlainPKCEUnknownChallenge() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowForcedPlainPKCEValidChallenge
public void testWithAuthorizationCodeFlowForcedPlainPKCEValidChallenge() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowForcedS256PKCEPlainChallenge
public void testWithAuthorizationCodeFlowForcedS256PKCEPlainChallenge() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowForcedS256PKCEUnknownChallenge
public void testWithAuthorizationCodeFlowForcedS256PKCEUnknownChallenge() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowForcedS256PKCEValidChallenge
public void testWithAuthorizationCodeFlowForcedS256PKCEValidChallenge() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowNoScopes
public void testWithAuthorizationCodeFlowNoScopes() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowNoScopesIssInResponse
public void testWithAuthorizationCodeFlowNoScopesIssInResponse() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowWithIDTokenClaims
public void testWithAuthorizationCodeFlowWithIDTokenClaims() throws IOException, net.shibboleth.idp.session.SessionException, DataSealerException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionDataSealerExceptionParseException
-
testWithAuthorizationCodeFlowWithUIClaims
public void testWithAuthorizationCodeFlowWithUIClaims() throws IOException, net.shibboleth.idp.session.SessionException, DataSealerException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionDataSealerExceptionParseException
-
testWithAuthorizationCodeFlowWithCustomClaimInCode
public void testWithAuthorizationCodeFlowWithCustomClaimInCode() throws IOException, net.shibboleth.idp.session.SessionException, DataSealerException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionDataSealerExceptionParseException
-
testWithAuthorizationCodeFlowUsingSAMLMetadata
public void testWithAuthorizationCodeFlowUsingSAMLMetadata() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithAuthorizationCodeFlowUsingUntrustedRP
public void testWithAuthorizationCodeFlowUsingUntrustedRP() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithPlainReqObjectExpired
public void testWithPlainReqObjectExpired() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithPlainReqObjectNbfInFuture
public void testWithPlainReqObjectNbfInFuture() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithPlainReqObjectOverwriteRedirectUri
public void testWithPlainReqObjectOverwriteRedirectUri() throws IOException, net.shibboleth.idp.session.SessionException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionException
-
testWithPlainReqObjectClaimsRequest
public void testWithPlainReqObjectClaimsRequest() throws IOException, net.shibboleth.idp.session.SessionException, DataSealerException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptionDataSealerExceptionParseException
-
testWithSignedReqObjectNoIssuer
public void testWithSignedReqObjectNoIssuer() throws IOException, net.shibboleth.idp.session.SessionException, com.nimbusds.jose.JOSEException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptioncom.nimbusds.jose.JOSEException
-
testWithSignedReqObjectNoAudience
public void testWithSignedReqObjectNoAudience() throws IOException, net.shibboleth.idp.session.SessionException, com.nimbusds.jose.JOSEException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptioncom.nimbusds.jose.JOSEException
-
testWithSignedReqObjectWrongIssuer
public void testWithSignedReqObjectWrongIssuer() throws IOException, net.shibboleth.idp.session.SessionException, com.nimbusds.jose.JOSEException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptioncom.nimbusds.jose.JOSEException
-
testWithSignedReqObjectWrongAudience
public void testWithSignedReqObjectWrongAudience() throws IOException, net.shibboleth.idp.session.SessionException, com.nimbusds.jose.JOSEException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptioncom.nimbusds.jose.JOSEException
-
testWithSignedReqObjectOverwriteRedirectUri
public void testWithSignedReqObjectOverwriteRedirectUri() throws IOException, ParseException, net.shibboleth.idp.session.SessionException, com.nimbusds.jose.JOSEException- Throws:
IOExceptionParseExceptionnet.shibboleth.idp.session.SessionExceptioncom.nimbusds.jose.JOSEException
-
testWithSignedReqObjectClaimsRequest
public void testWithSignedReqObjectClaimsRequest() throws IOException, net.shibboleth.idp.session.SessionException, com.nimbusds.jose.JOSEException, DataSealerException, ParseException- Throws:
IOExceptionnet.shibboleth.idp.session.SessionExceptioncom.nimbusds.jose.JOSEExceptionDataSealerExceptionParseException
-
assertRequestObjectError
protected void assertRequestObjectError(com.nimbusds.jwt.JWT requestObject) throws IOException- Throws:
IOException
-
assertErrorResponseWithNoIssuer
protected void assertErrorResponseWithNoIssuer(FlowExecutionResult result)
-
assertErrorResponseWithIssuer
protected void assertErrorResponseWithIssuer(FlowExecutionResult result)
-
removeMetadata
@AfterMethod public void removeMetadata() throws IOException
- Throws:
IOException
-
-