Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
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
ARSnova
ARSnova Backend
Commits
b8e4b342
Commit
b8e4b342
authored
10 years ago
by
Daniel Gerhardt
Committed by
Daniel Gerhardt
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use DefaultSpringSecurityContextSource instead of DirContextSource
parent
9b83ed60
Branches
Branches containing commit
Tags
v2.0.1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/config/SecurityConfig.java
+3
-3
3 additions, 3 deletions
src/main/java/de/thm/arsnova/config/SecurityConfig.java
with
3 additions
and
3 deletions
src/main/java/de/thm/arsnova/config/SecurityConfig.java
+
3
−
3
View file @
b8e4b342
...
...
@@ -12,7 +12,7 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.core.io.FileSystemResource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.ldap.core.support.
Dir
ContextSource
;
import
org.springframework.ldap.core.support.
Ldap
ContextSource
;
import
org.springframework.security.authentication.AuthenticationManager
;
import
org.springframework.security.authentication.dao.DaoAuthenticationProvider
;
import
org.springframework.security.cas.ServiceProperties
;
...
...
@@ -28,6 +28,7 @@ import org.springframework.security.core.session.SessionRegistry;
import
org.springframework.security.core.session.SessionRegistryImpl
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.security.ldap.DefaultSpringSecurityContextSource
;
import
org.springframework.security.ldap.authentication.BindAuthenticator
;
import
org.springframework.security.ldap.authentication.LdapAuthenticationProvider
;
import
org.springframework.security.ldap.authentication.LdapAuthenticator
;
...
...
@@ -194,8 +195,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public
LdapAuthenticationProvider
ldapAuthenticationProvider
()
{
DirContextSource
contextSource
=
new
DirContextSource
();
contextSource
.
setUrl
(
ldapUrl
);
LdapContextSource
contextSource
=
new
DefaultSpringSecurityContextSource
(
ldapUrl
);
contextSource
.
setUserDn
(
ldapUserDn
);
LdapAuthenticator
authenticator
=
new
BindAuthenticator
(
contextSource
);
LdapAuthenticationProvider
authProvider
=
new
LdapAuthenticationProvider
(
authenticator
,
new
NullLdapAuthoritiesPopulator
());
...
...
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