aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2021-09-14 12:37:14 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2021-09-14 12:37:14 +0200
commit664c9bcffc537dc206140f03ca0a7c9b81b396cd (patch)
treeec6172b240fc610a08b7c0dd92806cc564205544 /id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
parente0f2c884de659fb1bd3670bdc1ac04edf2382552 (diff)
downloadmoa-id-spss-664c9bcffc537dc206140f03ca0a7c9b81b396cd.tar.gz
moa-id-spss-664c9bcffc537dc206140f03ca0a7c9b81b396cd.tar.bz2
moa-id-spss-664c9bcffc537dc206140f03ca0a7c9b81b396cd.zip
update EHVD communication-task to implement new requirements from BRZ
Diffstat (limited to 'id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java')
-rw-r--r--id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java32
1 files changed, 29 insertions, 3 deletions
diff --git a/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java b/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
index 900adaff7..cf58fe718 100644
--- a/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
+++ b/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
@@ -83,7 +83,7 @@ public class EhvdCommunicationService implements IEhvdCommunication {
*/
@Override
@Nonnull
- public List<String> getRoles(IIdentityLink identityLink) throws AuthenticationException,
+ public EhvdResponseHolder getRoles(IIdentityLink identityLink) throws AuthenticationException,
EAAFBuilderException {
// get bPK for EHVD request
@@ -96,7 +96,7 @@ public class EhvdCommunicationService implements IEhvdCommunication {
final GdaIndexResponse gdaResp = requestingGda(ehvdBpk.getFirst());
// parse roles from response
- return parseGdaResponse(gdaResp);
+ return EhvdResponseHolder.getInstance(gdaResp.getGda(), parseGdaResponse(gdaResp));
}
@@ -287,7 +287,33 @@ public class EhvdCommunicationService implements IEhvdCommunication {
http.getClient().setProxyServerPort(Integer.valueOf(socksPort));
}
-
}
+ public static class EhvdResponseHolder {
+ final List<String> roles;
+ final GdaDescriptor fullGdaResponse;
+
+
+ public static EhvdResponseHolder getInstance(GdaDescriptor gdaInfo, List<String> processedRoles) {
+ return new EhvdResponseHolder(gdaInfo, processedRoles);
+
+ }
+
+ private EhvdResponseHolder(GdaDescriptor gdaInfo, List<String> processedRoles) {
+ this.roles = processedRoles;
+ this.fullGdaResponse = gdaInfo;
+
+ }
+
+ public List<String> getRoles() {
+ return roles;
+ }
+
+ public GdaDescriptor getFullGdaResponse() {
+ return fullGdaResponse;
+ }
+
+
+
+ }
}