Package org.springframework.security.ldap.userdetails

Examples of org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator


    private LdapAuthenticationProvider build() throws Exception {
        BaseLdapPathContextSource contextSource = getContextSource();
        LdapAuthenticator ldapAuthenticator = createLdapAuthenticator(contextSource);

        LdapAuthoritiesPopulator authoritiesPopulator = getLdapAuthoritiesPopulator();

        LdapAuthenticationProvider ldapAuthenticationProvider = new LdapAuthenticationProvider(
                ldapAuthenticator, authoritiesPopulator);
        SimpleAuthorityMapper simpleAuthorityMapper = new SimpleAuthorityMapper();
        simpleAuthorityMapper.setPrefix(rolePrefix);
View Full Code Here


      ldapConfigurer.groupSearchBase(groupSearchBase)
          .groupSearchFilter(groupSearchFilter)
          .groupRoleAttribute(groupRoleAttribute);
    }
    else {
      ldapConfigurer.ldapAuthoritiesPopulator(new LdapAuthoritiesPopulator() {
        @Override
        public Collection<? extends GrantedAuthority> getGrantedAuthorities(DirContextOperations userData, String username) {

          return Collections.singleton(new SimpleGrantedAuthority("ROLE_ADMIN"));
        }
View Full Code Here

        if (ldapConfig.getUserDnPattern() != null) {
            authenticator.setUserDnPatterns(new String[] { ldapConfig
                    .getUserDnPattern() });
        }

        LdapAuthoritiesPopulator authPopulator = null;
        LdapAuthenticationProvider provider = null;
        String ugServiceName = ldapConfig.getUserGroupServiceName();
        if (ugServiceName != null) {
            // use local user group service for loading authorities
            GeoServerUserGroupService ugService;
View Full Code Here

TOP

Related Classes of org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.