1 /* Copyright 2004 Acegi Technology Pty Limited
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package org.acegisecurity.providers.jaas;
17
18 import org.acegisecurity.GrantedAuthorityImpl;
19
20 import java.security.Principal;
21
22
23 /***
24 * Extends GrantedAuthorityImpl to hold the principal that an AuthorityGranter
25 * justified as a reason to grant this Authority. <br>
26 *
27 * @author Ray Krueger
28 * @version $Id: JaasGrantedAuthority.java,v 1.3 2005/11/17 00:55:52 benalex Exp $
29 *
30 * @see AuthorityGranter
31 */
32 public class JaasGrantedAuthority extends GrantedAuthorityImpl {
33 //~ Instance fields ========================================================
34
35 private Principal principal;
36
37 //~ Constructors ===========================================================
38
39 public JaasGrantedAuthority(String role, Principal principal) {
40 super(role);
41 this.principal = principal;
42 }
43
44 //~ Methods ================================================================
45
46 public Principal getPrincipal() {
47 return principal;
48 }
49 }