Skip to content
Snippets Groups Projects
Commit 0afafb90 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Add custom auth to allow combined login pages for multiple auth services

parent a4bb697f
Branches
Tags
No related merge requests found
...@@ -82,6 +82,18 @@ public class LoginController extends AbstractController { ...@@ -82,6 +82,18 @@ public class LoginController extends AbstractController {
@Value("${security.guest.lecturer.enabled}") @Value("${security.guest.lecturer.enabled}")
private String guestLecturerEnabled; private String guestLecturerEnabled;
@Value("${security.custom-login.enabled}")
private String customLoginEnabled;
@Value("${security.custom-login.title:University}")
private String customLoginTitle;
@Value("${security.custom-login.login-dialog-path}")
private String customLoginDialog;
@Value("${security.custom-login.image:}")
private String customLoginImage;
@Value("${security.user-db.enabled}") @Value("${security.user-db.enabled}")
private String dbAuthEnabled; private String dbAuthEnabled;
...@@ -313,7 +325,16 @@ public class LoginController extends AbstractController { ...@@ -313,7 +325,16 @@ public class LoginController extends AbstractController {
services.add(sdesc); services.add(sdesc);
} }
if ("true".equals(dbAuthEnabled)) { if ("true".equals(customLoginEnabled) && !"".equals(customLoginDialog)) {
services.add(new ServiceDescription(
"custom",
customLoginTitle,
customizationPath + "/" + customLoginDialog + "?redirect={0}",
customLoginImage
));
}
if ("true".equals(dbAuthEnabled) && !"".equals(dbAuthDialog)) {
services.add(new ServiceDescription( services.add(new ServiceDescription(
"arsnova", "arsnova",
dbAuthTitle, dbAuthTitle,
...@@ -322,7 +343,7 @@ public class LoginController extends AbstractController { ...@@ -322,7 +343,7 @@ public class LoginController extends AbstractController {
)); ));
} }
if ("true".equals(ldapEnabled)) { if ("true".equals(ldapEnabled) && !"".equals(ldapDialog)) {
services.add(new ServiceDescription( services.add(new ServiceDescription(
"ldap", "ldap",
ldapTitle, ldapTitle,
......
...@@ -14,6 +14,13 @@ security.authentication.login-try-limit=50 ...@@ -14,6 +14,13 @@ security.authentication.login-try-limit=50
security.guest.enabled=true security.guest.enabled=true
security.guest.lecturer.enabled=true security.guest.lecturer.enabled=true
# Setup combined login if you want to use a single, customized login page
# which is used for multiple authentication services.
security.custom-login.enabled=false
security.custom-login.title=University
security.custom-login.login-dialog-path=
security.custom-login.image=
security.user-db.enabled=true security.user-db.enabled=true
security.user-db.title=ARSnova security.user-db.title=ARSnova
security.user-db.login-dialog-path=account.html security.user-db.login-dialog-path=account.html
......
...@@ -14,6 +14,13 @@ security.authentication.login-try-limit=50 ...@@ -14,6 +14,13 @@ security.authentication.login-try-limit=50
security.guest.enabled=true security.guest.enabled=true
security.guest.lecturer.enabled=true security.guest.lecturer.enabled=true
# Setup combined login if you want to use a single, customized login page
# which is used for multiple authentication services.
security.custom-login.enabled=false
security.custom-login.title=University
security.custom-login.login-dialog-path=
security.custom-login.image=
security.user-db.enabled=true security.user-db.enabled=true
security.user-db.title=ARSnova security.user-db.title=ARSnova
security.user-db.login-dialog-path=account.html security.user-db.login-dialog-path=account.html
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment