diff options
author | Thomas <> | 2022-03-16 15:37:39 +0100 |
---|---|---|
committer | Thomas <> | 2022-03-16 15:37:39 +0100 |
commit | 7471d2724a9ade98b30296545c39c7d49c690e10 (patch) | |
tree | 829adb53ad881549f0c33868f3889aeeda24e650 /modules/authmodule-eIDAS-v2/src/test/java/at/asitplus | |
parent | d0196bc950695c2f780045709b0189e1845a16c0 (diff) | |
download | National_eIDAS_Gateway-7471d2724a9ade98b30296545c39c7d49c690e10.tar.gz National_eIDAS_Gateway-7471d2724a9ade98b30296545c39c7d49c690e10.tar.bz2 National_eIDAS_Gateway-7471d2724a9ade98b30296545c39c7d49c690e10.zip |
test(szr): add second randomized integration test for SZR communication
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/test/java/at/asitplus')
-rw-r--r-- | modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java index 1e7ff369..0ea62855 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java @@ -105,6 +105,17 @@ public class SzrClientTestProduction { } @Test + public void getVszRandom() throws SzrCommunicationException, EidasSAuthenticationException { + String vsz = szrClient.getEncryptedStammzahl(getPersonInfo( + RandomStringUtils.randomAlphabetic(10), + familyName, dateOfBirth, + "IS/AT/" + RandomStringUtils.randomAlphanumeric(15) + )); + Assert.assertNotNull("vsz", vsz); + + } + + @Test public void getEidasBind() throws SzrCommunicationException, EidasSAuthenticationException { String vsz = RandomStringUtils.randomAlphanumeric(10); String bindingPubKey = Base64.toBase64String(RandomStringUtils.random(20).getBytes()); @@ -203,7 +214,9 @@ public class SzrClientTestProduction { } } - private PersonInfoType getPersonInfo() throws EidasSAuthenticationException { + private PersonInfoType getPersonInfo(String givenname, String familyname, String dateofbirth, + String eidaseid) throws EidasSAuthenticationException { + final PersonInfoType personInfo = new PersonInfoType(); final PersonNameType personName = new PersonNameType(); final PhysicalPersonType naturalPerson = new PhysicalPersonType(); @@ -215,7 +228,7 @@ public class SzrClientTestProduction { // parse some eID attributes final Triple<String, String, String> eIdentifier = - EidasResponseUtils.parseEidasPersonalIdentifier(eIDASeID); + EidasResponseUtils.parseEidasPersonalIdentifier(eidaseid); final String uniqueId = createHashFromUniqueId(eIdentifier.getThird()); final String citizenCountry = eIdentifier.getFirst(); @@ -232,5 +245,11 @@ public class SzrClientTestProduction { Constants.SZR_CONSTANTS_DEFAULT_DOCUMENT_TYPE)); return personInfo; + + } + + private PersonInfoType getPersonInfo() throws EidasSAuthenticationException { + return getPersonInfo(givenName, familyName, dateOfBirth, eIDASeID); + } } |