summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core/src/main/java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java19
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EIDCcsURL.java44
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java2
3 files changed, 64 insertions, 1 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java
index 8a59a0be..86728c05 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java
@@ -20,6 +20,7 @@ public class EidAuthenticationData extends AuthenticationData implements IEidAut
private byte[] eIDToken;
private byte[] signerCertificate;
private EID_IDENTITY_STATUS_LEVEL_VALUES eidStatus;
+ private String vdaEndpointUrl;
private boolean useMandate = false;
@Override
@@ -43,6 +44,11 @@ public class EidAuthenticationData extends AuthenticationData implements IEidAut
return useMandate;
}
+ @Override
+ public String getVdaEndPointUrl() {
+ return vdaEndpointUrl;
+
+ }
/**
* Set the status of the E-ID identity
@@ -98,5 +104,18 @@ public class EidAuthenticationData extends AuthenticationData implements IEidAut
public void setUseMandate(boolean useMandate) {
this.useMandate = useMandate;
}
+
+
+ /**
+ * Set URL of the EndPoint that was used on VDA for authentication
+ *
+ * @param vdaEndpointUrl
+ */
+ public void setVdaEndpointUrl(String vdaEndpointUrl) {
+ this.vdaEndpointUrl = vdaEndpointUrl;
+ }
+
+
+
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EIDCcsURL.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EIDCcsURL.java
new file mode 100644
index 00000000..ec0f5d0c
--- /dev/null
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EIDCcsURL.java
@@ -0,0 +1,44 @@
+package at.gv.egiz.eaaf.core.impl.idp.builder.attributes;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import at.gv.egiz.eaaf.core.api.idp.IAttributeGenerator;
+import at.gv.egiz.eaaf.core.api.idp.IAuthData;
+import at.gv.egiz.eaaf.core.api.idp.IEidAuthData;
+import at.gv.egiz.eaaf.core.api.idp.IPVPAttributeBuilder;
+import at.gv.egiz.eaaf.core.api.idp.ISPConfiguration;
+import at.gv.egiz.eaaf.core.exceptions.AttributeBuilderException;
+import at.gv.egiz.eaaf.core.exceptions.UnavailableAttributeException;
+
+@PVPMETADATA
+public class EIDCcsURL implements IPVPAttributeBuilder {
+ private static final Logger log = LoggerFactory.getLogger(EID_CCS_URL_NAME);
+
+ @Override
+ public String getName() {
+ return EID_CCS_URL_NAME;
+ }
+
+ @Override
+ public <ATT> ATT build(ISPConfiguration oaParam, IAuthData authData,
+ IAttributeGenerator<ATT> g) throws AttributeBuilderException {
+ if (authData instanceof IEidAuthData) {
+ final String bkuurl = ((IEidAuthData)authData).getVdaEndPointUrl();
+ if (StringUtils.isNotEmpty(bkuurl))
+ return g.buildStringAttribute(EID_CCS_URL_FRIENDLY_NAME, EID_CCS_URL_NAME, bkuurl);
+
+
+ } else
+ log.info(EID_CCS_URL_FRIENDLY_NAME + " is only available in MOA-ID context");
+
+ throw new UnavailableAttributeException(EID_CCS_URL_NAME);
+ }
+
+ @Override
+ public <ATT> ATT buildEmpty(IAttributeGenerator<ATT> g) {
+ return g.buildEmptyAttribute(EID_CCS_URL_FRIENDLY_NAME, EID_CCS_URL_NAME);
+ }
+
+}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
index 1da8036c..5ad44801 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
@@ -72,7 +72,7 @@ public abstract class AbstractController {
@Autowired protected IRevisionLogger revisionsLogger;
@ExceptionHandler({EAAFException.class})
- public void MOAIDExceptionHandler(final HttpServletRequest req, final HttpServletResponse resp, final Exception e) throws IOException {
+ public void EAAFExceptionHandler(final HttpServletRequest req, final HttpServletResponse resp, final Exception e) throws IOException {
try {
protAuthService.handleErrorNoRedirect(e, req, resp, true);