Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
f2e12808
Commit
f2e12808
authored
10 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Add DB and LDAP to auth services returned by API
parent
6d38ea5a
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/controller/LoginController.java
+18
-4
18 additions, 4 deletions
src/main/java/de/thm/arsnova/controller/LoginController.java
with
18 additions
and
4 deletions
src/main/java/de/thm/arsnova/controller/LoginController.java
+
18
−
4
View file @
f2e12808
...
@@ -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
cas
Enabled
;
private
String
dbAuth
Enabled
;
@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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment