| Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
| JaasGrantedAuthority |
|
| 1.0;1 |
| 1 | /* Copyright 2004, 2005, 2006 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 justified as a reason to grant this |
|
| 25 | * Authority. <br> |
|
| 26 | * |
|
| 27 | * @author Ray Krueger |
|
| 28 | * @version $Id: JaasGrantedAuthority.java 1784 2007-02-24 21:00:24Z luke_t $ |
|
| 29 | * |
|
| 30 | * @see AuthorityGranter |
|
| 31 | */ |
|
| 32 | public class JaasGrantedAuthority extends GrantedAuthorityImpl { |
|
| 33 | //~ Instance fields ================================================================================================ |
|
| 34 | ||
| 35 | private static final long serialVersionUID = 1L; |
|
| 36 | private Principal principal; |
|
| 37 | ||
| 38 | //~ Constructors =================================================================================================== |
|
| 39 | ||
| 40 | public JaasGrantedAuthority(String role, Principal principal) { |
|
| 41 | 8 | super(role); |
| 42 | 8 | this.principal = principal; |
| 43 | 8 | } |
| 44 | ||
| 45 | //~ Methods ======================================================================================================== |
|
| 46 | ||
| 47 | public Principal getPrincipal() { |
|
| 48 | 4 | return principal; |
| 49 | } |
|
| 50 | } |