diff options
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/IDPCredentialProvider.java | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/IDPCredentialProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/IDPCredentialProvider.java index 8fb4ec3cf..abc4eb4a9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/IDPCredentialProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/IDPCredentialProvider.java @@ -29,6 +29,7 @@ import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; import at.gv.egovernment.moa.util.FileUtils; +import at.gv.egovernment.moa.util.MiscUtil; @Service("IDPCredentialProvider") public class IDPCredentialProvider extends AbstractCredentialProvider { @@ -70,7 +71,11 @@ public class IDPCredentialProvider extends AbstractCredentialProvider { if (props == null) props = authConfig.getGeneralPVP2ProperiesConfig(); - return props.getProperty(IDP_KS_PASS).trim(); + String value = props.getProperty(IDP_KS_PASS); + if (MiscUtil.isNotEmpty(value)) + return value.trim(); + else + return null; } /* (non-Javadoc) @@ -81,7 +86,11 @@ public class IDPCredentialProvider extends AbstractCredentialProvider { if (props == null) props = authConfig.getGeneralPVP2ProperiesConfig(); - return props.getProperty(IDP_KEYALIASMETADATA).trim(); + String value = props.getProperty(IDP_KEYALIASMETADATA); + if (MiscUtil.isNotEmpty(value)) + return value.trim(); + else + return null; } /* (non-Javadoc) @@ -92,7 +101,11 @@ public class IDPCredentialProvider extends AbstractCredentialProvider { if (props == null) props = authConfig.getGeneralPVP2ProperiesConfig(); - return props.getProperty(IDP_KEY_PASSMETADATA).trim(); + String value = props.getProperty(IDP_KEY_PASSMETADATA); + if (MiscUtil.isNotEmpty(value)) + return value.trim(); + else + return null; } /* (non-Javadoc) @@ -103,7 +116,11 @@ public class IDPCredentialProvider extends AbstractCredentialProvider { if (props == null) props = authConfig.getGeneralPVP2ProperiesConfig(); - return props.getProperty(IDP_KEYALIASASSERTION).trim(); + String value = props.getProperty(IDP_KEYALIASASSERTION); + if (MiscUtil.isNotEmpty(value)) + return value.trim(); + else + return null; } /* (non-Javadoc) @@ -114,7 +131,11 @@ public class IDPCredentialProvider extends AbstractCredentialProvider { if (props == null) props = authConfig.getGeneralPVP2ProperiesConfig(); - return props.getProperty(IDP_KEY_PASSASSERTION).trim(); + String value = props.getProperty(IDP_KEY_PASSASSERTION); + if (MiscUtil.isNotEmpty(value)) + return value.trim(); + else + return null; } /* (non-Javadoc) @@ -125,7 +146,11 @@ public class IDPCredentialProvider extends AbstractCredentialProvider { if (props == null) props = authConfig.getGeneralPVP2ProperiesConfig(); - return props.getProperty(IDP_KEYALIASENCRYTPION).trim(); + String value = props.getProperty(IDP_KEYALIASENCRYTPION); + if (MiscUtil.isNotEmpty(value)) + return value.trim(); + else + return null; } /* (non-Javadoc) @@ -136,7 +161,11 @@ public class IDPCredentialProvider extends AbstractCredentialProvider { if (props == null) props = authConfig.getGeneralPVP2ProperiesConfig(); - return props.getProperty(IDP_KEYALIASENCRYTPION).trim(); + String value = props.getProperty(IDP_KEY_PASSENCRYTPION); + if (MiscUtil.isNotEmpty(value)) + return value.trim(); + else + return null; } /* (non-Javadoc) |