Class EncryptJWTHandlerTest
- java.lang.Object
-
- net.shibboleth.oidc.security.impl.AbstractHandlerTest
-
- net.shibboleth.oidc.security.impl.EncryptJWTHandlerTest
-
public class EncryptJWTHandlerTest extends AbstractHandlerTest
Tests for theEncryptJWTHandlermessage handler.Note, These tests encrypt a RequestObject.
-
-
Field Summary
Fields Modifier and Type Field Description private static StringCLIENT_SECRETA client_secret to use.private net.shibboleth.oidc.security.impl.EncryptJWTHandlerencrypterThe signer to test.private net.shibboleth.oidc.profile.core.OIDCAuthenticationRequestrequestThe authn request.-
Fields inherited from class net.shibboleth.oidc.security.impl.AbstractHandlerTest
ac, prc, rootPrc, src
-
-
Constructor Summary
Constructors Constructor Description EncryptJWTHandlerTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidassertStandardClaimsExist(com.nimbusds.jwt.EncryptedJWT jwt)voidsetup()Setup the various contexts.voidtestEncryptDirect_Fail_WrongAlgorithmForCredential()voidtestEncryptDirect_Success()voidtestEncryptEC_Success()voidtestEncryptRSA_Success()voidtestEncryptWithUnsupportedAlgorithm()voidtestFail_IncorrectParamState()voidtestFail_NoEncryptionContext()voidtestFail_NoEncryptionParams()voidtestKeyWrap_Success()
-
-
-
Field Detail
-
CLIENT_SECRET
@Nonnull private static final String CLIENT_SECRET
A client_secret to use.- See Also:
- Constant Field Values
-
encrypter
private net.shibboleth.oidc.security.impl.EncryptJWTHandler encrypter
The signer to test.
-
request
private net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest request
The authn request.
-
-
Method Detail
-
setup
@BeforeMethod public void setup() throws ExceptionDescription copied from class:AbstractHandlerTestSetup the various contexts.- Overrides:
setupin classAbstractHandlerTest- Throws:
Exception- on error
-
assertStandardClaimsExist
private void assertStandardClaimsExist(com.nimbusds.jwt.EncryptedJWT jwt)
-
testEncryptDirect_Success
public void testEncryptDirect_Success() throws Exception- Throws:
Exception
-
testEncryptDirect_Fail_WrongAlgorithmForCredential
public void testEncryptDirect_Fail_WrongAlgorithmForCredential() throws Exception- Throws:
Exception
-
testFail_NoEncryptionContext
public void testFail_NoEncryptionContext() throws Exception- Throws:
Exception
-
testFail_NoEncryptionParams
public void testFail_NoEncryptionParams() throws Exception- Throws:
Exception
-
testFail_IncorrectParamState
public void testFail_IncorrectParamState() throws Exception- Throws:
Exception
-
-