diff options
author | lalber <lukas.alber@iaik.tugraz.at> | 2020-11-02 23:29:54 +0100 |
---|---|---|
committer | lalber <lukas.alber@iaik.tugraz.at> | 2020-11-02 23:29:54 +0100 |
commit | 8e239b9cb072e62d693f3d54a6a9ad2d9983cc71 (patch) | |
tree | 50c71f74f6a48d502d354a689994418a2a2771f7 /eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus | |
parent | 608b9ac7a9f4d3ebdb6efa2d4e5453d5a015be3a (diff) | |
download | National_eIDAS_Gateway-8e239b9cb072e62d693f3d54a6a9ad2d9983cc71.tar.gz National_eIDAS_Gateway-8e239b9cb072e62d693f3d54a6a9ad2d9983cc71.tar.bz2 National_eIDAS_Gateway-8e239b9cb072e62d693f3d54a6a9ad2d9983cc71.zip |
AuthDataBuilder and AttributeBuilder
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus')
2 files changed, 12 insertions, 5 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java index eac62aae..83a2afa6 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java @@ -157,8 +157,8 @@ public class Constants { public static final String SZR_CONSTANTS_DEFAULT_DOCUMENT_TYPE = "ELEKTR_DOKUMENT"; // AuthBlock - public static final String SZR_AUTHBLOCK = "AUTHBLOCK"; - public static final String EIDAS_BIND = "EIDAS_BIND"; + public static final String SZR_AUTHBLOCK = "authData_AUTHBLOCK"; + public static final String EIDAS_BIND = "authData_EIDAS_BIND"; // TODO remove!!! diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java index b141402a..86f28561 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java @@ -249,10 +249,10 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { ObjectMapper mapper = new ObjectMapper(); String jwsPayload = mapper.writeValueAsString(pendingReq.getUniqueTransactionIdentifier()); - String jwsSignature = JoseUtils.createSignature(ks, KSALIAS, KSPASSWORD.toCharArray(), jwsPayload, false, KSALIAS);//TODO joseutils kopiern + String jwsSignature = JoseUtils.createSignature(ks, KSALIAS, KSPASSWORD.toCharArray(), jwsPayload, false, KSALIAS); authProcessData.setGenericDataToSession(Constants.SZR_AUTHBLOCK, jwsSignature); - authProcessData.setGenericDataToSession(Constants.EIDAS_BIND, jwsSignature); + authProcessData.setGenericDataToSession(Constants.EIDAS_BIND, signedEidasBind); } else { final IdentityLinkType result = szrClient.getIdentityLinkInRawMode(personInfo); @@ -294,7 +294,14 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { } } - if (eidMode.equals("new")) {} + if (eidMode.equals("new")) { + authProcessData.setForeigner(true); + authProcessData.setGenericDataToSession( + PvpAttributeDefinitions.EID_ISSUING_NATION_NAME, + EidasResponseUtils.parseEidasPersonalIdentifier((String) simpleAttrMap.get( + Constants.eIDAS_ATTR_PERSONALIDENTIFIER)).getFirst()); + authProcessData.setQaaLevel(eidasResponse.getLevelOfAssurance()); + } else { if (identityLink == null) { log.error("ERnB did not return an identity link."); |