01: /*
02: * Tomcat: The deployer for the tomcat daemon
03: * Created on July 10, 2007, 6:23 AM
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18: *
19: * CoadunationGenericPrincipal.java
20: */
21:
22: // package path
23: package com.rift.coad.daemon.tomcat.security;
24:
25: // java imports
26: import java.security.Principal;
27: import java.util.Arrays;
28: import java.util.List;
29:
30: // tomcat import
31: import org.apache.catalina.realm.GenericPrincipal;
32: import org.apache.catalina.Realm;
33:
34: // coadunation imports
35: import com.rift.coad.lib.security.UserSession;
36:
37: /**
38: * This object extends the Tomcat Generic Principal object.
39: *
40: * @author brett
41: */
42: public class CoadunationGenericPrincipal extends GenericPrincipal {
43:
44: // private member variables
45: private UserSession session = null;
46:
47: /**
48: * Creates a new instance of CoadunationGenericPrincipal
49: */
50: public CoadunationGenericPrincipal(Realm realm, String name,
51: String password, List roles, UserSession session) {
52: super (realm, name, password, roles);
53: this .session = session;
54: }
55:
56: /**
57: * This method returns the user session.
58: *
59: * @return The user session contained by t his object.
60: */
61: public UserSession getSession() {
62: return session;
63: }
64:
65: }
|