diff options
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java index 922d86fc0..713fd538e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java @@ -49,6 +49,7 @@ import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral; import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes; import at.gv.egovernment.moa.id.commons.db.dao.config.ForeignIdentities; +import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber; import at.gv.egovernment.moa.id.commons.db.dao.config.IdentityLinkSigners; import at.gv.egovernment.moa.id.commons.db.dao.config.LegacyAllowed; import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration; @@ -57,6 +58,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineMandates; import at.gv.egovernment.moa.id.commons.db.dao.config.Protocols; import at.gv.egovernment.moa.id.commons.db.dao.config.SLRequestTemplates; +import at.gv.egovernment.moa.id.commons.db.dao.config.SSO; import at.gv.egovernment.moa.id.commons.db.dao.config.SecurityLayer; import at.gv.egovernment.moa.id.commons.db.dao.config.TimeOuts; import at.gv.egovernment.moa.id.commons.db.dao.config.TrustAnchor; @@ -617,6 +619,95 @@ public class AuthConfigurationProvider extends ConfigurationProvider { return null; } + public boolean isSSOBusinessService() throws ConfigurationException { + AuthComponentGeneral auth = getAuthComponentGeneral(); + + SSO sso = auth.getSSO(); + + if (sso!= null) { + if (sso.getIdentificationNumber() != null) + return true; + } + return false; + } + + public IdentificationNumber getSSOBusinessService() throws ConfigurationException { + AuthComponentGeneral auth = getAuthComponentGeneral(); + + SSO sso = auth.getSSO(); + + if (sso!= null) + return sso.getIdentificationNumber(); + + return null; + } + + public String getSSOTarget() throws ConfigurationException { + AuthComponentGeneral auth = getAuthComponentGeneral(); + + SSO sso = auth.getSSO(); + + if (sso!= null) + return sso.getTarget(); + + return null; + } + + public String getSSOFriendlyName() { + AuthComponentGeneral auth; + try { + auth = getAuthComponentGeneral(); + + SSO sso = auth.getSSO(); + + if (sso!= null) + return sso.getFriendlyName(); + + } catch (ConfigurationException e) { + Logger.warn("No SSO FriendlyName found. Use default Name!!!"); + } + return "Default MOA-ID friendly name for SSO"; + } + + public String getSSOSpecialText() { + try { + AuthComponentGeneral auth = getAuthComponentGeneral(); + + SSO sso = auth.getSSO(); + + if (sso!= null) { + String text = sso.getSpecialText(); + if (MiscUtil.isEmpty(text)) + text = new String(); + return text; + } + + + } catch (ConfigurationException e) { + } + return new String(); + } + + public String getSSOPublicUrl() { + try { + AuthComponentGeneral auth = getAuthComponentGeneral(); + + SSO sso = auth.getSSO(); + + if (sso!= null) { + String url = sso.getPublicURL(); + + if (MiscUtil.isEmpty(url)) + url = new String(); + + return url; + } + + } catch (ConfigurationException e) { + } + return new String(); + } + /** * Retruns the STORK Configuration * @return STORK Configuration |