added logger warning if issuer url does not use http scheme.

pull/369/merge
William Kim 2013-06-27 15:36:11 -04:00 committed by Justin Richer
parent 42027e451c
commit ab4d1da9d4
1 changed files with 17 additions and 0 deletions

View File

@ -16,6 +16,11 @@
******************************************************************************/
package org.mitre.openid.connect.config;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
@ -28,6 +33,8 @@ package org.mitre.openid.connect.config;
*/
public class ConfigurationPropertiesBean {
private static Logger logger = LoggerFactory.getLogger(ConfigurationPropertiesBean.class);
private String issuer;
private String topbarTitle;
@ -37,6 +44,16 @@ public class ConfigurationPropertiesBean {
public ConfigurationPropertiesBean() {
}
/**
* Endpoints protected by TLS must have https scheme in the URI.
*/
@PostConstruct
public void checkForHttps() {
if (!issuer.substring(0, 5).equalsIgnoreCase("https")) {
logger.warn("Configured issuer url is not using https scheme.");
}
}
/**
* @return the issuer baseUrl