aboutsummaryrefslogtreecommitdiff
path: root/modules/eidas_proxy-sevice/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'modules/eidas_proxy-sevice/src/main')
-rw-r--r--modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/dto/attributes/AttrMappingElement.java6
-rw-r--r--modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/service/ProxyEidasAttributeRegistry.java18
2 files changed, 23 insertions, 1 deletions
diff --git a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/dto/attributes/AttrMappingElement.java b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/dto/attributes/AttrMappingElement.java
index cf106bad..2dffbc2d 100644
--- a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/dto/attributes/AttrMappingElement.java
+++ b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/dto/attributes/AttrMappingElement.java
@@ -13,6 +13,8 @@ import lombok.Data;
@JsonPropertyOrder({
"eidasAttribute",
"idaAttribute",
+ "addionalRequiredAttributes",
+ "specificAttributeHandlerClass",
"type"
})
@Data
@@ -34,6 +36,10 @@ public class AttrMappingElement {
@JsonProperty("addionalRequiredAttributes")
private List<String> addionalRequiredAttributes;
+
+ @JsonProperty("specificAttributeHandlerClass")
+ private String specificAttributeHandlerClass;
+
/**
* attribute characteristics.
*/
diff --git a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/service/ProxyEidasAttributeRegistry.java b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/service/ProxyEidasAttributeRegistry.java
index a6a50100..a0c99019 100644
--- a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/service/ProxyEidasAttributeRegistry.java
+++ b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/service/ProxyEidasAttributeRegistry.java
@@ -111,7 +111,7 @@ public class ProxyEidasAttributeRegistry {
}
/**
- * Get eIDAS related IDA attribute.
+ * Get eIDAS related IDA attribute for a specific mode-operation.
*
* @param eidasAttributeName Name of the eIDAS attribute.
* @param withMandates <code>true</code> if mandates are supported, otherwise <code>false</code>
@@ -127,6 +127,22 @@ public class ProxyEidasAttributeRegistry {
}
+ /**
+ * Get eIDAS related custom attribute-handler.
+ *
+ * @param eidasAttributeName Name of the eIDAS attribute.
+ * @return full classname of the handler implementation if available
+ */
+ public Optional<String> mapEidasAttributeToAttributeHandler(String eidasAttributeName) {
+ return attributeConfiguration.stream()
+ .filter(el -> el.getEidasAttributeName().equals(eidasAttributeName))
+ .filter(el -> StringUtils.isNotEmpty(el.getSpecificAttributeHandlerClass()))
+ .findFirst()
+ .map(el -> el.getSpecificAttributeHandlerClass());
+
+ }
+
+
@PostConstruct
private void initialize() throws EaafConfigurationException {
final String attrConfPath = basicConfig.getBasicConfiguration(