Class DecryptNameIDsTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.saml.saml2.profile.impl.DecryptNameIDsTest
-
public class DecryptNameIDsTest extends OpenSAMLInitBaseTestCase
Unit test forDecryptNameIDs.
-
-
Field Summary
Fields Modifier and Type Field Description private DecryptNameIDsactionprivate DataEncryptionParametersencParamsprivate Encrypterencrypterprivate StringencURIprivate KeyInfoCredentialResolverkeyResolverprivate SAMLObjectBuilder<NameID>nameIdBuilderprivate ProfileRequestContextprcprivate SAMLObjectBuilder<Subject>subjectBuilder
-
Constructor Summary
Constructors Constructor Description DecryptNameIDsTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidtestEncryptedNameID()Test decryption of an NameID as an EncryptedID.voidtestEncryptedNameIDNoParams()Test decryption of an NameID as an EncryptedID.voidtestNoMessage()voidtestWrongKeyFatal()Test failed decryption of an NameID as an EncryptedID.voidtestWrongKeyNonFatal()Test failed decryption of an NameID as an EncryptedID.-
Methods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
keyResolver
private KeyInfoCredentialResolver keyResolver
-
encURI
private String encURI
-
encParams
private DataEncryptionParameters encParams
-
encrypter
private Encrypter encrypter
-
prc
private ProfileRequestContext prc
-
action
private DecryptNameIDs action
-
nameIdBuilder
private SAMLObjectBuilder<NameID> nameIdBuilder
-
subjectBuilder
private SAMLObjectBuilder<Subject> subjectBuilder
-
-
Method Detail
-
setUp
@BeforeMethod public void setUp() throws NoSuchAlgorithmException, KeyException- Throws:
NoSuchAlgorithmExceptionKeyException
-
testNoMessage
public void testNoMessage() throws ComponentInitializationException- Throws:
ComponentInitializationException
-
testEncryptedNameIDNoParams
public void testEncryptedNameIDNoParams() throws EncryptionException, ComponentInitializationExceptionTest decryption of an NameID as an EncryptedID.- Throws:
EncryptionException- ...ComponentInitializationException- ...
-
testEncryptedNameID
public void testEncryptedNameID() throws EncryptionException, ComponentInitializationExceptionTest decryption of an NameID as an EncryptedID.- Throws:
EncryptionException- ...ComponentInitializationException- ...
-
testWrongKeyFatal
public void testWrongKeyFatal() throws ExceptionTest failed decryption of an NameID as an EncryptedID.- Throws:
Exception- if something goes wrong
-
-