View Javadoc
1   /**
2    * Waffle (https://github.com/dblock/waffle)
3    *
4    * Copyright (c) 2010 - 2015 Application Security, Inc.
5    *
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of the Eclipse Public License v1.0
8    * which accompanies this distribution, and is available at
9    * http://www.eclipse.org/legal/epl-v10.html
10   *
11   * Contributors:
12   *     Application Security, Inc.
13   */
14  package waffle.spring;
15  
16  import org.springframework.security.core.GrantedAuthority;
17  
18  import waffle.windows.auth.WindowsAccount;
19  
20  /**
21   * Used by {@link WindowsAuthenticationToken} to convert {@link WindowsAccount}s representing groups into
22   * {@link GrantedAuthority}s.
23   */
24  public interface GrantedAuthorityFactory {
25  
26      /**
27       * Creates a {@link GrantedAuthority} from the given {@link WindowsAccount}.
28       *
29       * @param windowsAccount
30       *            the windows account
31       * @return the granted authority
32       */
33      GrantedAuthority createGrantedAuthority(final WindowsAccount windowsAccount);
34  
35  }