diff --git a/src/main/java/de/thm/arsnova/controller/LoginController.java b/src/main/java/de/thm/arsnova/controller/LoginController.java index 90f2edc6416cbb0518e0c09f8ec170d0b1bdc427..207006816b5ebe319557804b16b02a7bc097c080 100644 --- a/src/main/java/de/thm/arsnova/controller/LoginController.java +++ b/src/main/java/de/thm/arsnova/controller/LoginController.java @@ -78,10 +78,16 @@ public class LoginController extends AbstractController { private String guestLecturerEnabled; @Value("${security.user-db.enabled}") private String dbAuthEnabled; + @Value("${security.user-db.title:ARSnova}") + private String dbAuthTitle; @Value("${security.ldap.enabled}") private String ldapEnabled; + @Value("${security.ldap.title:LDAP}") + private String ldapTitle; @Value("${security.cas.enabled}") private String casEnabled; + @Value("${security.cas.title:CAS}") + private String casTitle; @Value("${security.facebook.enabled}") private String facebookEnabled; @Value("${security.google.enabled}") @@ -262,6 +268,7 @@ public class LoginController extends AbstractController { if ("true".equals(guestEnabled)) { ServiceDescription sdesc = new ServiceDescription( + "guest", "Guest", null ); @@ -273,14 +280,16 @@ public class LoginController extends AbstractController { if ("true".equals(dbAuthEnabled)) { services.add(new ServiceDescription( - "ARSnova", + "arsnova", + dbAuthTitle, null )); } if ("true".equals(ldapEnabled)) { services.add(new ServiceDescription( - "LDAP", + "ldap", + ldapTitle, null )); } @@ -288,7 +297,8 @@ public class LoginController extends AbstractController { if ("true".equals(casEnabled)) { try { services.add(new ServiceDescription( - "CAS", + "cas", + casTitle, casEntryPoint.getLoginUrl() + "?" + casEntryPoint.getServiceProperties().getServiceParameter() + "=" + URLEncoder.encode(casEntryPoint.getServiceProperties().getService(), "UTF-8") @@ -301,6 +311,7 @@ public class LoginController extends AbstractController { if ("true".equals(facebookEnabled)) { services.add(new ServiceDescription( + "facebook", "Facebook", facebookProvider.getAuthorizationUrl(new HttpUserSession(request)) )); @@ -308,6 +319,7 @@ public class LoginController extends AbstractController { if ("true".equals(googleEnabled)) { services.add(new ServiceDescription( + "google", "Google", googleProvider.getAuthorizationUrl(new HttpUserSession(request)) )); @@ -315,6 +327,7 @@ public class LoginController extends AbstractController { if ("true".equals(twitterEnabled)) { services.add(new ServiceDescription( + "twitter", "Twitter", twitterProvider.getAuthorizationUrl(new HttpUserSession(request)) )); diff --git a/src/main/java/de/thm/arsnova/entities/ServiceDescription.java b/src/main/java/de/thm/arsnova/entities/ServiceDescription.java index 2cc6bfabdf7fcc6b5caaa9fb9f7bb67e7d31a43c..01cd8b3b94ce818c4679f5349a0507c0c63fa360 100644 --- a/src/main/java/de/thm/arsnova/entities/ServiceDescription.java +++ b/src/main/java/de/thm/arsnova/entities/ServiceDescription.java @@ -1,22 +1,32 @@ package de.thm.arsnova.entities; public class ServiceDescription { - + private String id; private String name; private String dialogUrl; private boolean allowLecturer = true; - public ServiceDescription(String name, String dialogUrl) { + public ServiceDescription(String id, String name, String dialogUrl) { + this.id = id; this.name = name; this.dialogUrl = dialogUrl; } - public ServiceDescription(String name, String dialogUrl, boolean allowLecturer) { + public ServiceDescription(String id, String name, String dialogUrl, boolean allowLecturer) { + this.id = id; this.name = name; this.dialogUrl = dialogUrl; this.allowLecturer = allowLecturer; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getName() { return name; } @@ -40,5 +50,4 @@ public class ServiceDescription { public void setAllowLecturer(boolean allowLecturer) { this.allowLecturer = allowLecturer; } - } diff --git a/src/main/webapp/arsnova.properties.example b/src/main/webapp/arsnova.properties.example index 1b76bfb8a14842d39d21ab97e889d1dd60806bb9..9ec7ff3a50e99568cc1f803f72570636c8e9a87f 100644 --- a/src/main/webapp/arsnova.properties.example +++ b/src/main/webapp/arsnova.properties.example @@ -5,17 +5,20 @@ security.guest.enabled=true security.guest.lecturer.enabled=true security.user-db.enabled=true +security.user-db.title=ARSnova security.user-db.allowed-email-domains=* security.user-db.registration-mail.subject=ARSnova Registration security.user-db.registration-mail.body=Welcome to ARSnova!\n\nPlease confirm your registration by visiting the following web address:\n{0}\n\nAfterwards, you can log into ARSnova with your e-mail address and password. security.ldap.enabled=true +security.ldap.title=LDAP security.ldap.url=ldap://example.com:33389/dc=example,dc=com security.ldap.user-dn-pattern=uid={0},ou=arsnova security.ldap.user-search-filter=(uid={0}) security.ldap.user-search-base="ou=people" security.cas.enabled=true +security.cas.title=CAS security.cas-server-url=https://cas.thm.de/cas security.facebook.enabled=true diff --git a/src/test/resources/arsnova.properties.example b/src/test/resources/arsnova.properties.example index 1b76bfb8a14842d39d21ab97e889d1dd60806bb9..9ec7ff3a50e99568cc1f803f72570636c8e9a87f 100644 --- a/src/test/resources/arsnova.properties.example +++ b/src/test/resources/arsnova.properties.example @@ -5,17 +5,20 @@ security.guest.enabled=true security.guest.lecturer.enabled=true security.user-db.enabled=true +security.user-db.title=ARSnova security.user-db.allowed-email-domains=* security.user-db.registration-mail.subject=ARSnova Registration security.user-db.registration-mail.body=Welcome to ARSnova!\n\nPlease confirm your registration by visiting the following web address:\n{0}\n\nAfterwards, you can log into ARSnova with your e-mail address and password. security.ldap.enabled=true +security.ldap.title=LDAP security.ldap.url=ldap://example.com:33389/dc=example,dc=com security.ldap.user-dn-pattern=uid={0},ou=arsnova security.ldap.user-search-filter=(uid={0}) security.ldap.user-search-base="ou=people" security.cas.enabled=true +security.cas.title=CAS security.cas-server-url=https://cas.thm.de/cas security.facebook.enabled=true