Package web

Source Code of web.Populator

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package web;

import java.io.Serializable;
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.ldap.LdapDataAccessException;
import org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator;
import org.acegisecurity.userdetails.ldap.LdapUserDetails;

/**
*
* @author axe
*/
public class Populator implements Serializable, LdapAuthoritiesPopulator {

    @Override
    public GrantedAuthority[] getGrantedAuthorities(LdapUserDetails arg0) throws LdapDataAccessException {
        return new GrantedAuthority[] {
            new GrantedAuthority() {
                @Override
                public String getAuthority() {
                    return "ROLE_AUTH";
                }
        }};
    }

}
TOP

Related Classes of web.Populator

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.