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/builder/attributes/BpkAttributeBuilder.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/BpkAttributeBuilder.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/BpkAttributeBuilder.java
index 17919fc2..70e0f6d1 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/BpkAttributeBuilder.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/builder/attributes/BpkAttributeBuilder.java
@@ -57,12 +57,13 @@ public class BpkAttributeBuilder implements IPvpAttributeBuilder {
}
protected String getBpkForSP(final IAuthData authData) throws UnavailableAttributeException {
- final String bpk = attrMaxSize(authData.getBpk());
- final String type = BpkBuilder.removeBpkTypePrefix(authData.getBpkType());
-
- if (StringUtils.isEmpty(bpk)) {
+ if (StringUtils.isEmpty(authData.getBpk()) || StringUtils.isEmpty(authData.getBpkType())) {
throw new UnavailableAttributeException(BPK_NAME);
+
}
+
+ final String bpk = attrMaxSize(authData.getBpk());
+ final String type = BpkBuilder.removeBpkTypePrefix(authData.getBpkType());
return type + DELIMITER_BPKTYPE_BPK + bpk;