NIHVIVO-1393 The external authorization URL is not configurable.
This commit is contained in:
parent
ec12b4db3d
commit
a0225f1cc9
1 changed files with 10 additions and 8 deletions
|
@ -21,9 +21,11 @@ import freemarker.core.Environment;
|
|||
import freemarker.template.TemplateModel;
|
||||
|
||||
public class LoginWidget extends Widget {
|
||||
|
||||
private static final Log log = LogFactory.getLog(LoginWidget.class);
|
||||
|
||||
/** The page that kicks off the External Authentication process. */
|
||||
private static final String EXTERNAL_AUTH_SETUP_URL = "/loginExternalAuth";
|
||||
|
||||
private static enum Macro {
|
||||
LOGIN("loginForm"),
|
||||
FORCE_PASSWORD_CHANGE("forcePasswordChange"),
|
||||
|
@ -118,12 +120,12 @@ public class LoginWidget extends Widget {
|
|||
values.put(TemplateVariable.FORM_ACTION.toString(), getAuthenticateUrl(request));
|
||||
values.put(TemplateVariable.LOGIN_NAME.toString(), bean.getUsername());
|
||||
|
||||
String externalAuthServerUrl = ConfigurationProperties.getProperty("externalAuth.url");
|
||||
externalAuthServerUrl = UrlBuilder.getUrl(externalAuthServerUrl);
|
||||
if (externalAuthServerUrl != null) {
|
||||
values.put(TemplateVariable.EXTERNAL_AUTH_URL.toString(), externalAuthServerUrl);
|
||||
String externalAuthDisplayName = ConfigurationProperties.getProperty("externalAuth.displayName");
|
||||
if (externalAuthDisplayName != null) {
|
||||
values.put(TemplateVariable.EXTERNAL_AUTH_URL.toString(),
|
||||
UrlBuilder.getUrl(EXTERNAL_AUTH_SETUP_URL));
|
||||
values.put(TemplateVariable.EXTERNAL_AUTH_NAME.toString(),
|
||||
ConfigurationProperties.getProperty("externalAuth.displayName"));
|
||||
externalAuthDisplayName);
|
||||
}
|
||||
|
||||
String infoMessage = bean.getInfoMessage();
|
||||
|
|
Loading…
Add table
Reference in a new issue