01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * 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: * Extends GrantedAuthorityImpl to hold the principal that an AuthorityGranter justified as a reason to grant this
24: * Authority. <br>
25: *
26: * @author Ray Krueger
27: * @version $Id: JaasGrantedAuthority.java 1784 2007-02-24 21:00:24Z luke_t $
28: *
29: * @see AuthorityGranter
30: */
31: public class JaasGrantedAuthority extends GrantedAuthorityImpl {
32: //~ Instance fields ================================================================================================
33:
34: private static final long serialVersionUID = 1L;
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: }
|