NIHVIVO-1207 If deploy.properties does not contain a value for externalAuth.serverUrl, default to /loginExternalAuthReturn -- that way the users need only configure that as a protected page.

This commit is contained in:
jeb228 2010-11-23 21:05:52 +00:00
parent 0418489ec1
commit 6fe5ac59a9
2 changed files with 7 additions and 8 deletions

View file

@ -13,7 +13,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import edu.cornell.mannlib.vitro.webapp.ConfigurationProperties;
import edu.cornell.mannlib.vitro.webapp.dao.IndividualDao;
/**
* Capture the properties used by the External Authorization system, and use
@ -109,10 +108,10 @@ public class ExternalAuthHelper {
}
if (externalAuthServerUrl == null) {
log.error("User asked for external authentication, "
+ "but deploy.properties doesn't contain a value for '"
+ PROPERTY_EXTERNAL_AUTH_SERVER_URL + "'");
return null;
log.debug("deploy.properties doesn't contain a value for '"
+ PROPERTY_EXTERNAL_AUTH_SERVER_URL
+ "' -- sending directly to '" + returnUrl + "'");
return returnUrl;
}
try {

View file

@ -48,8 +48,8 @@ public class LoginExternalAuthSetup extends BaseLoginServlet {
LoginProcessBean.State.LOGGING_IN);
String returnUrl = buildReturnUrl(req);
ExternalAuthHelper helper = ExternalAuthHelper.getHelper(req);
String redirectUrl = helper.buildExternalAuthRedirectUrl(returnUrl);
String redirectUrl = ExternalAuthHelper.getHelper(req)
.buildExternalAuthRedirectUrl(returnUrl);
if (redirectUrl == null) {
complainAndReturnToReferrer(req, resp, ATTRIBUTE_REFERRER,