01: /*
02: * JOSSO: Java Open Single Sign-On
03: *
04: * Copyright 2004-2008, Atricore, Inc.
05: *
06: * This is free software; you can redistribute it and/or modify it
07: * under the terms of the GNU Lesser General Public License as
08: * published by the Free Software Foundation; either version 2.1 of
09: * the License, or (at your option) any later version.
10: *
11: * This software is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this software; if not, write to the Free
18: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
20: */
21: package org.josso.agent;
22:
23: import org.josso.gateway.GatewayServiceLocator;
24: import org.josso.gateway.identity.service.SSOIdentityManager;
25: import org.josso.gateway.session.service.SSOSessionManager;
26:
27: /**
28: * An Agent stands in between the Gateway and the Security Domain were partner application reside.
29: * It provides transparent security context to partner applications, providing user and role information
30: * by invoking the gateway through JAAS.
31: *
32: * @author <a href="mailto:gbrigand@josso.org">Gianluca Brigandi</a>
33: * @version CVS $Id: SSOAgent.java 508 2008-02-18 13:32:29Z sgonzalez $
34: */
35:
36: public interface SSOAgent extends LocalSessionListener {
37:
38: /**
39: * Starts the Agent.
40: */
41: void start();
42:
43: /**
44: * Obtains the principal associated with the given SSO id
45: *
46: * @param request with the JOSSO Single Sign-On Session Identifier
47: *
48: * @return the principal associated with the given session identifier
49: */
50: SingleSignOnEntry processRequest(SSOAgentRequest request);
51:
52: /**
53: * Stops the Agent.
54: */
55: void stop();
56:
57: /**
58: * Configures the Gateway Service Locator to be used by the SSOAgent.
59: *
60: * @param gsl
61: */
62: void setGatewayServiceLocator(GatewayServiceLocator gsl);
63:
64: /**
65: * Obtains the Gateway Service Locator used by the SSOAgent to build
66: * the concrete clients needed to query the Gateway services.
67: *
68: * This getter is need by the JAASLoginModule to know which Gateway Service Locator to use.
69: *
70: * @return the configured gateway service locator
71: */
72:
73: /**
74: * Gets the SSO Session Manager used by this agent.
75: */
76: SSOSessionManager getSSOSessionManager();
77:
78: /**
79: * Gets the SSO Identity Manager used by this agent.
80: */
81: SSOIdentityManager getSSOIdentityManager();
82:
83: /**
84: * Configures this agent.
85: */
86: void setConfiguration(SSOAgentConfiguration cfg);
87:
88: /**
89: * Getter for the agent configuration.
90: */
91: SSOAgentConfiguration getConfiguration();
92:
93: /**
94: * Returns true if the received context is a partner application.
95: * @param contextPath
96: * @return
97: */
98: boolean isPartnerApp(String contextPath);
99: }
|