Class DecryptRequestObjectTest
- java.lang.Object
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.DecryptRequestObjectTest
-
public class DecryptRequestObjectTest extends Object
DecryptRequestObjectunit test.
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.idp.plugin.oidc.op.profile.impl.DecryptRequestObjectactionprivate KeyPairkpprivate net.shibboleth.oidc.metadata.context.OIDCMetadataContextoidcCtxprivate OIDCAuthenticationResponseContextoidcRespCtxprivate ProfileRequestContextprcprivate RequestContextrequestCtx
-
Constructor Summary
Constructors Constructor Description DecryptRequestObjectTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidsetObject(com.nimbusds.jose.JWEAlgorithm alg, com.nimbusds.jose.EncryptionMethod enc)voidsetup()voidtestRequestObjectDecryptFailureNoMatchingAlg()Test decrypt failure, kt alg not matching.voidtestRequestObjectDecryptFailureNoMatchingEnc()Test decrypt failure, enc alg not matching.voidtestRequestObjectDecryptFailureNoMatchingKey()Test decrypt failure, no matching key.voidtestRequestObjectDecryptSuccess()Test decrypt success.voidtestRequestObjectFailureNoEncCtx()Test decrypt failure, no enc context.voidtestRequestObjectFailureNoParameters()Test decrypt failure, no params.voidtestSuccessNoObject()Test success in case of not having request objectvoidtestSuccessNotJWE()Test success in case of not having to decrypt.
-
-
-
Field Detail
-
prc
private ProfileRequestContext prc
-
action
private net.shibboleth.idp.plugin.oidc.op.profile.impl.DecryptRequestObject action
-
requestCtx
private RequestContext requestCtx
-
oidcCtx
private net.shibboleth.oidc.metadata.context.OIDCMetadataContext oidcCtx
-
oidcRespCtx
private OIDCAuthenticationResponseContext oidcRespCtx
-
kp
private KeyPair kp
-
-
Method Detail
-
setup
@BeforeMethod public void setup() throws ComponentInitializationException, NoSuchAlgorithmException
-
testSuccessNoObject
public void testSuccessNoObject() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxExceptionTest success in case of not having request object
-
testSuccessNotJWE
public void testSuccessNotJWE() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxException, ParseExceptionTest success in case of not having to decrypt.
-
setObject
private void setObject(com.nimbusds.jose.JWEAlgorithm alg, com.nimbusds.jose.EncryptionMethod enc) throws com.nimbusds.jose.JOSEException, ParseException- Throws:
com.nimbusds.jose.JOSEExceptionParseException
-
testRequestObjectDecryptSuccess
public void testRequestObjectDecryptSuccess() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxException, com.nimbusds.jose.JOSEException, ParseExceptionTest decrypt success.- Throws:
NoSuchAlgorithmExceptionComponentInitializationExceptionURISyntaxExceptioncom.nimbusds.jose.JOSEExceptionParseException
-
testRequestObjectDecryptFailureNoMatchingKey
public void testRequestObjectDecryptFailureNoMatchingKey() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxException, com.nimbusds.jose.JOSEException, ParseExceptionTest decrypt failure, no matching key.- Throws:
NoSuchAlgorithmExceptionComponentInitializationExceptionURISyntaxExceptioncom.nimbusds.jose.JOSEExceptionParseException
-
testRequestObjectDecryptFailureNoMatchingAlg
public void testRequestObjectDecryptFailureNoMatchingAlg() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxException, com.nimbusds.jose.JOSEException, ParseExceptionTest decrypt failure, kt alg not matching.- Throws:
NoSuchAlgorithmExceptionComponentInitializationExceptionURISyntaxExceptioncom.nimbusds.jose.JOSEExceptionParseException
-
testRequestObjectDecryptFailureNoMatchingEnc
public void testRequestObjectDecryptFailureNoMatchingEnc() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxException, com.nimbusds.jose.JOSEException, ParseExceptionTest decrypt failure, enc alg not matching.- Throws:
NoSuchAlgorithmExceptionComponentInitializationExceptionURISyntaxExceptioncom.nimbusds.jose.JOSEExceptionParseException
-
testRequestObjectFailureNoParameters
public void testRequestObjectFailureNoParameters() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxException, com.nimbusds.jose.JOSEException, ParseExceptionTest decrypt failure, no params.- Throws:
NoSuchAlgorithmExceptionComponentInitializationExceptionURISyntaxExceptioncom.nimbusds.jose.JOSEExceptionParseException
-
testRequestObjectFailureNoEncCtx
public void testRequestObjectFailureNoEncCtx() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxException, com.nimbusds.jose.JOSEException, ParseExceptionTest decrypt failure, no enc context.- Throws:
NoSuchAlgorithmExceptionComponentInitializationExceptionURISyntaxExceptioncom.nimbusds.jose.JOSEExceptionParseException
-
-