KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > web > tomcat > tc6 > sso > SSOClusterManager


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.web.tomcat.tc6.sso;
23
24 import org.apache.catalina.Session;
25 import org.apache.catalina.Lifecycle;
26
27 /**
28  * Provides communications support between a SingleSignOn valve and other
29  * such valves configured for the same hostname within a server cluster.
30  * <p/>
31  * Implementations of this interface must declare a public no-arguments
32  * constructor.
33  *
34  * @author Brian E. Stansberry
35  * @version $Revision: 45726 $ $Date: 2006-06-21 15:50:00 -0400 (Wed, 21 Jun 2006) $
36  * @see ClusteredSingleSignOn
37  */

38 public interface SSOClusterManager
39    extends Lifecycle
40 {
41
42    /**
43     * Notify the cluster of the addition of a Session to an SSO session.
44     *
45     * @param ssoId the id of the SSO session
46     * @param session the Session that has been added
47     */

48    void addSession(String JavaDoc ssoId, Session session);
49
50    /**
51     * Gets the SingleSignOn valve for which this object is handling
52     * cluster communications.
53     *
54     * @return the <code>SingleSignOn</code> valve.
55     */

56    ClusteredSingleSignOn getSingleSignOnValve();
57
58    /**
59     * Sets the SingleSignOn valve for which this object is handling
60     * cluster communications.
61     * <p><b>NOTE:</b> This method must be called before calls can be
62     * made to the other methods of this interface.
63     *
64     * @param valve a <code>SingleSignOn</code> valve.
65     */

66    void setSingleSignOnValve(ClusteredSingleSignOn valve);
67
68    /**
69     * Notifies the cluster that a single sign on session has been terminated
70     * due to a user logout.
71     *
72     * @param ssoId the id of the SSO session
73     */

74    void logout(String JavaDoc ssoId);
75
76    /**
77     * Queries the cluster for the existence of a SSO session with the given
78     * id, returning a <code>SingleSignOnEntry</code> if one is found.
79     *
80     * @param ssoId the id of the SSO session
81     * @return a <code>SingleSignOnEntry</code> created using information
82     * found on another cluster node, or <code>null</code> if no
83     * entry could be found.
84     */

85    SingleSignOnEntry lookup(String JavaDoc ssoId);
86
87    /**
88     * Notifies the cluster of the creation of a new SSO entry.
89     *
90     * @param ssoId the id of the SSO session
91     * @param authType the type of authenticator (BASIC, CLIENT-CERT, DIGEST
92     * or FORM) used to authenticate the SSO.
93     * @param username the username (if any) used for the authentication
94     * @param password the password (if any) used for the authentication
95     */

96    void register(String JavaDoc ssoId, String JavaDoc authType, String JavaDoc username,
97       String JavaDoc password);
98
99    /**
100     * Notify the cluster of the removal of a Session from an SSO session.
101     *
102     * @param ssoId the id of the SSO session
103     * @param session the Session that has been removed
104     */

105    void removeSession(String JavaDoc ssoId, Session session);
106
107    /**
108     * Notifies the cluster of an update of the security credentials
109     * associated with an SSO session.
110     *
111     * @param ssoId the id of the SSO session
112     * @param authType the type of authenticator (BASIC, CLIENT-CERT, DIGEST
113     * or FORM) used to authenticate the SSO.
114     * @param username the username (if any) used for the authentication
115     * @param password the password (if any) used for the authentication
116     */

117    void updateCredentials(String JavaDoc ssoId, String JavaDoc authType, String JavaDoc username,
118       String JavaDoc password);
119
120
121 }
122
Popular Tags