summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java
diff options
context:
space:
mode:
authorThomas <>2021-03-04 22:37:04 +0100
committerThomas <>2021-03-04 22:37:04 +0100
commit2c83ec8f4200e7e1fa9a8df6d80c7097c72995c9 (patch)
treefbede515c13a90804cba50d76171f12f5d32a1e7 /eaaf_core/src/main/java
parentfbcc941e3683cf02ead1aebb9f3de695a301b739 (diff)
downloadEAAF-Components-2c83ec8f4200e7e1fa9a8df6d80c7097c72995c9.tar.gz
EAAF-Components-2c83ec8f4200e7e1fa9a8df6d80c7097c72995c9.tar.bz2
EAAF-Components-2c83ec8f4200e7e1fa9a8df6d80c7097c72995c9.zip
update some attribute-builders
Diffstat (limited to 'eaaf_core/src/main/java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIdentityStatusLevelAttributeBuiler.java10
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIssuingNationAttributeBuilder.java2
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidSignerCertificate.java7
3 files changed, 10 insertions, 9 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIdentityStatusLevelAttributeBuiler.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIdentityStatusLevelAttributeBuiler.java
index ee51564e..8345dcf8 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIdentityStatusLevelAttributeBuiler.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIdentityStatusLevelAttributeBuiler.java
@@ -1,8 +1,5 @@
package at.gv.egiz.eaaf.core.impl.idp.builder.attributes;
-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;
@@ -10,11 +7,11 @@ 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;
+import lombok.extern.slf4j.Slf4j;
+@Slf4j
@PvpMetadata
public class EidIdentityStatusLevelAttributeBuiler implements IPvpAttributeBuilder {
- private static final Logger log =
- LoggerFactory.getLogger(EidIdentityStatusLevelAttributeBuiler.class);
@Override
public String getName() {
@@ -28,12 +25,15 @@ public class EidIdentityStatusLevelAttributeBuiler implements IPvpAttributeBuild
if (authData instanceof IEidAuthData) {
if (((IEidAuthData) authData).getEidStatus() == null) {
throw new UnavailableAttributeException(getName());
+
}
return g.buildStringAttribute(getFriendlyName(), getName(),
((IEidAuthData) authData).getEidStatus().getUri());
+
} else {
log.info(getFriendlyName() + " is only available in EAAF context");
+
}
throw new UnavailableAttributeException(getName());
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIssuingNationAttributeBuilder.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIssuingNationAttributeBuilder.java
index fd85871c..90e8c285 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIssuingNationAttributeBuilder.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidIssuingNationAttributeBuilder.java
@@ -41,7 +41,7 @@ public class EidIssuingNationAttributeBuilder implements IPvpAttributeBuilder {
final String countryCode = authData.getCiticenCountryCode();
if (StringUtils.isNotEmpty(countryCode)) {
return g.buildStringAttribute(EID_ISSUING_NATION_FRIENDLY_NAME, EID_ISSUING_NATION_NAME,
- countryCode);
+ countryCode.toUpperCase());
} else {
return null;
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidSignerCertificate.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidSignerCertificate.java
index 6f857779..daed8455 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidSignerCertificate.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/EidSignerCertificate.java
@@ -53,16 +53,17 @@ public class EidSignerCertificate implements IPvpAttributeBuilder {
EID_SIGNER_CERTIFICATE_NAME, Base64Utils.encodeToString(signerCertificate));
} else {
- log.info(EID_SIGNER_CERTIFICATE_FRIENDLY_NAME + " is only available in MOA-ID context");
+ log.debug("{} is not available", EID_SIGNER_CERTIFICATE_FRIENDLY_NAME);
+
}
} catch (final Exception e) {
- log.info("Signer certificate BASE64 encoding error");
+ log.info("{} BASE64 encoding error", EID_SIGNER_CERTIFICATE_FRIENDLY_NAME);
}
} else {
- log.info(EID_SIGNER_CERTIFICATE_FRIENDLY_NAME + " is only available in AuthHandler context");
+ log.info("{} is only available in AuthHandler context", EID_SIGNER_CERTIFICATE_FRIENDLY_NAME);
}
throw new UnavailableAttributeException(EID_SIGNER_CERTIFICATE_NAME);