aboutsummaryrefslogtreecommitdiff
path: root/connector/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'connector/src/main/java')
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java9
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/EidasBindAttributeBuilder.java6
2 files changed, 6 insertions, 9 deletions
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java
index c9cbdb84..80f91e57 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java
@@ -27,15 +27,14 @@ 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;
import at.gv.egiz.eaaf.core.impl.idp.builder.attributes.PvpMetadata;
+import org.apache.commons.lang3.StringUtils;
@PvpMetadata
public class AuthBlockAttributeBuilder implements IPvpAttributeBuilder {
- // private static final String AUTHBLOCK_FRIENDLY_NAME = "AUTHBLOCK";
- // private static final String AUTHBLOCK_NAME = "urn:oid:x.x.x.x"; //TODO set oid
- private static final String EID_AUTHBLOCK_SIGNED_NAME = "urn:eidgvat:attributes.authblock.signed";
- private static final String EID_AUTHBLOCK_SIGNED_FRIENDLY_NAME = "userAuthBlock";
+ public static final String EID_AUTHBLOCK_SIGNED_NAME = "urn:eidgvat:attributes.authblock.signed";
+ public static final String EID_AUTHBLOCK_SIGNED_FRIENDLY_NAME = "userAuthBlock";
@Override
public String getName() {
@@ -47,7 +46,7 @@ public class AuthBlockAttributeBuilder implements IPvpAttributeBuilder {
final IAttributeGenerator<ATT> g) throws AttributeBuilderException {
String authBlock = authData.getGenericData(Constants.SZR_AUTHBLOCK, String.class);
- if (authBlock != null) {
+ if (StringUtils.isNotEmpty(authBlock)) {
return g.buildStringAttribute(EID_AUTHBLOCK_SIGNED_FRIENDLY_NAME, EID_AUTHBLOCK_SIGNED_NAME, authBlock);
} else {
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/EidasBindAttributeBuilder.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/EidasBindAttributeBuilder.java
index 53f52ab3..a4fe8c6c 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/EidasBindAttributeBuilder.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/EidasBindAttributeBuilder.java
@@ -27,7 +27,7 @@ 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;
import at.gv.egiz.eaaf.core.impl.idp.builder.attributes.PvpMetadata;
-
+import org.apache.commons.lang3.StringUtils;
import static at.gv.egiz.eaaf.core.api.data.ExtendedPvpAttributeDefinitions.EID_EIDBIND_FRIENDLY_NAME;
import static at.gv.egiz.eaaf.core.api.data.ExtendedPvpAttributeDefinitions.EID_EIDBIND_NAME;
@@ -35,8 +35,6 @@ import static at.gv.egiz.eaaf.core.api.data.ExtendedPvpAttributeDefinitions.EID_
@PvpMetadata
public class EidasBindAttributeBuilder implements IPvpAttributeBuilder {
- // private static final String EIDASBIND_FRIENDLY_NAME = "EIDASBIND";
- // private static final String EIDASBIND_NAME = "urn:oid:x.x.x.x"; //TODO set oid
@Override
public String getName() {
@@ -48,7 +46,7 @@ public class EidasBindAttributeBuilder implements IPvpAttributeBuilder {
final IAttributeGenerator<ATT> g) throws AttributeBuilderException {
String eidasBind = authData.getGenericData(Constants.EIDAS_BIND, String.class);
- if (eidasBind != null) {
+ if (StringUtils.isNotEmpty(eidasBind)) {
return g.buildStringAttribute(EID_EIDBIND_FRIENDLY_NAME, EID_EIDBIND_NAME, eidasBind);
} else {