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

Add DB and LDAP to auth services returned by API

parent 6d38ea5a
No related merge requests found
...@@ -24,7 +24,6 @@ import java.net.URLEncoder; ...@@ -24,7 +24,6 @@ import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -39,7 +38,6 @@ import org.slf4j.LoggerFactory; ...@@ -39,7 +38,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.cas.authentication.CasAuthenticationToken; import org.springframework.security.cas.authentication.CasAuthenticationToken;
...@@ -78,10 +76,12 @@ public class LoginController extends AbstractController { ...@@ -78,10 +76,12 @@ public class LoginController extends AbstractController {
private String guestEnabled; private String guestEnabled;
@Value("${security.guest.lecturer.enabled}") @Value("${security.guest.lecturer.enabled}")
private String guestLecturerEnabled; private String guestLecturerEnabled;
@Value("${security.cas.enabled}") @Value("${security.user-db.enabled}")
private String casEnabled; private String dbAuthEnabled;
@Value("${security.ldap.enabled}") @Value("${security.ldap.enabled}")
private String ldapEnabled; private String ldapEnabled;
@Value("${security.cas.enabled}")
private String casEnabled;
@Value("${security.facebook.enabled}") @Value("${security.facebook.enabled}")
private String facebookEnabled; private String facebookEnabled;
@Value("${security.google.enabled}") @Value("${security.google.enabled}")
...@@ -269,6 +269,20 @@ public class LoginController extends AbstractController { ...@@ -269,6 +269,20 @@ public class LoginController extends AbstractController {
services.add(sdesc); services.add(sdesc);
} }
if ("true".equals(dbAuthEnabled)) {
services.add(new ServiceDescription(
"ARSnova",
null
));
}
if ("true".equals(ldapEnabled)) {
services.add(new ServiceDescription(
"LDAP",
null
));
}
if ("true".equals(casEnabled)) { if ("true".equals(casEnabled)) {
try { try {
services.add(new ServiceDescription( services.add(new ServiceDescription(
......
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