Class ValidatePKCETest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.BaseOIDCResponseActionTest
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidatePKCETest
-
public class ValidatePKCETest extends BaseOIDCResponseActionTest
ValidatePKCEunit test.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.BaseOIDCResponseActionTest
BaseOIDCResponseActionTest.MockRevocationCache
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidatePKCEactionAction.private StringcodeVerifierCode verifier.-
Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.BaseOIDCResponseActionTest
clientId, credentialEC256, credentialEC384, credentialEC521, credentialHMAC, credentialRSA, idGenerator, metadataCtx, profileRequestCtx, request, requestCtx, respCtx, rpCtx, subject
-
-
Constructor Summary
Constructors Constructor Description ValidatePKCETest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidinit()voidtestFailPlain()Test fail case of using "plain" with wrong value.voidtestFailPlainNotAllowed()Test fail case of using "plain" as it is not allowed by default.voidtestFailUnknownType()Test fail in the case of unknowm method.voidtestFailureNoPKCE()Test failure in the case of having forced PKCE and not using the PKCE parameters.voidtestFailureTokenRequestMissingVerfier()Test failure in the case of missing code verifier in token request.voidtestSuccess()Test success case of using "S256".voidtestSuccessNoAuthzCode()Test success in the case of having forced PKCE, not using the PKCE parameters but different grant type than Authz Code.voidtestSuccessNoPKCE()Test success in the case of not having forced PKCE and not using the PKCE parameters.voidtestSuccessPlain()Test success case of using "plain".voidtestWrongValue()Test success case of using "S256".-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.BaseOIDCResponseActionTest
addEntryToMap, getDataSealer, initializeDataSealer, setAuthenticationRequest, setIdTokenToResponseContext, setTokenRequest, setUp, setUserInfoRequest, setUserInfoResponseToResponseContext, signIdTokenInResponseContext, signUserInfoResponseInResponseContext
-
-
-
-
Field Detail
-
action
private net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidatePKCE action
Action.
-
codeVerifier
private String codeVerifier
Code verifier.
-
-
Method Detail
-
init
@BeforeMethod private void init() throws ComponentInitializationException, URISyntaxException, com.nimbusds.oauth2.sdk.ParseException
- Throws:
ComponentInitializationExceptionURISyntaxExceptioncom.nimbusds.oauth2.sdk.ParseException
-
testSuccess
public void testSuccess()
Test success case of using "S256".
-
testWrongValue
public void testWrongValue() throws URISyntaxExceptionTest success case of using "S256".- Throws:
URISyntaxException
-
testFailPlainNotAllowed
public void testFailPlainNotAllowed() throws URISyntaxExceptionTest fail case of using "plain" as it is not allowed by default.- Throws:
URISyntaxException
-
testSuccessPlain
public void testSuccessPlain() throws URISyntaxExceptionTest success case of using "plain".- Throws:
URISyntaxException
-
testFailPlain
public void testFailPlain() throws URISyntaxExceptionTest fail case of using "plain" with wrong value.- Throws:
URISyntaxException
-
testSuccessNoPKCE
public void testSuccessNoPKCE() throws URISyntaxExceptionTest success in the case of not having forced PKCE and not using the PKCE parameters.- Throws:
URISyntaxException
-
testFailureNoPKCE
public void testFailureNoPKCE() throws URISyntaxExceptionTest failure in the case of having forced PKCE and not using the PKCE parameters.- Throws:
URISyntaxException
-
testFailureTokenRequestMissingVerfier
public void testFailureTokenRequestMissingVerfier() throws URISyntaxExceptionTest failure in the case of missing code verifier in token request.- Throws:
URISyntaxException
-
testSuccessNoAuthzCode
public void testSuccessNoAuthzCode() throws URISyntaxExceptionTest success in the case of having forced PKCE, not using the PKCE parameters but different grant type than Authz Code.- Throws:
URISyntaxException
-
testFailUnknownType
public void testFailUnknownType() throws URISyntaxExceptionTest fail in the case of unknowm method.- Throws:
URISyntaxException
-
-