01: /*
02: * Copyright 2007 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: */
13: package com.pentaho.security.ldap;
14:
15: import org.acegisecurity.GrantedAuthority;
16: import org.acegisecurity.ldap.LdapDataAccessException;
17: import org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator;
18: import org.acegisecurity.userdetails.ldap.LdapUserDetails;
19:
20: /**
21: * For use when authorities are stored in the user object (e.g.
22: * <code>objectClass=Person</code>) and therefore retrieved by an
23: * <code>LdapEntryMapper</code> instance. This class helps since
24: * <code>LdapAuthenticationProvider</code> requires a
25: * <code>LdapAuthoritiesPopulator</code> instance.
26: *
27: * @author mlowery
28: *
29: */
30: public class NoOpLdapAuthoritiesPopulator implements
31: LdapAuthoritiesPopulator {
32:
33: public GrantedAuthority[] getGrantedAuthorities(
34: LdapUserDetails userDetails) throws LdapDataAccessException {
35: return new GrantedAuthority[0];
36: }
37:
38: }
|