Examples of LdapAuthoritiesPopulator


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

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

      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

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

        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
Copyright © 2018 www.massapi.com. 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.