Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
ARSnova LMS Connector
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
ARSnova
ARSnova LMS Connector
Commits
d50e48bf
Commit
d50e48bf
authored
Nov 21, 2014
by
Andreas Gärtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ldapBindDn and ldapBindPassword to LDAP SecurityConfig.
parent
1105640e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
SecurityConfig.java
.../java/de/thm/arsnova/connector/config/SecurityConfig.java
+14
-1
No files found.
connector-service/src/main/java/de/thm/arsnova/connector/config/SecurityConfig.java
View file @
d50e48bf
...
...
@@ -33,6 +33,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// LDAP
@Value
(
"${ldap.serverUrl}"
)
private
String
ldapServerUrl
;
@Value
(
"${ldap.bindDn}"
)
private
String
ldapBindDn
;
@Value
(
"${ldap.bindPassword}"
)
private
String
ldapBindPassword
;
@Value
(
"${ldap.userSearchBase}"
)
private
String
ldapUserSearchBase
;
@Value
(
"${ldap.userSearchFilter}"
)
private
String
ldapUserSearchFilter
;
...
...
@@ -83,7 +85,18 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public
BaseLdapPathContextSource
ldapContextSource
()
{
if
(!
""
.
equals
(
ldapServerUrl
))
{
return
new
DefaultSpringSecurityContextSource
(
ldapServerUrl
);
DefaultSpringSecurityContextSource
contextSource
=
new
DefaultSpringSecurityContextSource
(
ldapServerUrl
);
if
(!
""
.
equals
(
ldapBindDn
))
{
contextSource
.
setBase
(
ldapBindDn
);
}
if
(!
""
.
equals
(
ldapBindPassword
))
{
contextSource
.
setPassword
(
ldapBindPassword
);
}
return
contextSource
;
}
return
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment