Skip to content

roles to ldap group? #1

@zaszlo

Description

@zaszlo

Hello,

How would it be accomplished to attach an ldap group/memberOf to role admin and user? Like, this is how its done in memory:

.inMemoryAuthentication()
                .withUser("admin").password("admin").roles("ADMIN", "USER").and()
                .withUser("user").password("user").roles("USER");

And how to modify the following to assign to our example ben user a user or admin role?

.ldapAuthentication()
				.userDnPatterns("uid={0},ou=people")
				.groupSearchBase("ou=groups")
				.contextSource(contextSource())
				.passwordCompare()
				.passwordEncoder(new LdapShaPasswordEncoder())
				.passwordAttribute("userPassword");

Thanks for extending a bit the ldap example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions