View Javadoc

1   /**
2    *
3    * Copyright 2003-2004 The Apache Software Foundation
4    *
5    *  Licensed under the Apache License, Version 2.0 (the "License");
6    *  you may not use this file except in compliance with the License.
7    *  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   *  Unless required by applicable law or agreed to in writing, software
12   *  distributed under the License is distributed on an "AS IS" BASIS,
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   *  See the License for the specific language governing permissions and
15   *  limitations under the License.
16   */
17  package org.apache.geronimo.tomcat;
18  
19  
20  import java.security.Principal;
21  import java.util.List;
22  import javax.security.auth.Subject;
23  
24  
25  /**
26   * @version $Rev: 355877 $ $Date: 2005-12-10 18:48:27 -0800 (Sat, 10 Dec 2005) $
27   */
28  public class JAASTomcatPrincipal implements Principal {
29      private final String name;
30      private Subject subject;
31      private List roles;
32  
33      public JAASTomcatPrincipal(String name) {
34          this.name = name;
35      }
36  
37      public String getName() {
38          return name;
39      }
40  
41      public Subject getSubject() {
42          return subject;
43      }
44  
45      public void setSubject(Subject subject) {
46          this.subject = subject;
47      }
48  
49      public List getRoles() {
50          return roles;
51      }
52  
53      public void setRoles(List roles) {
54          this.roles = roles;
55      }
56  }