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:
22: package org.josso.servlet.agent;
23:
24: import org.josso.agent.SSOAgentRequestImpl;
25: import org.josso.agent.LocalSession;
26:
27: import javax.servlet.http.HttpServletRequest;
28: import javax.servlet.http.HttpServletResponse;
29:
30: /**
31: * This SSO Agent Request wrapps original servlet request and response objects.
32: *
33: * It also provides a placeholder for the JOSSO Security context created by the Servlet SSO Agent during authentication.
34: *
35: * Date: Nov 27, 2007
36: * Time: 11:53:50 AM
37: *
38: * @author <a href="mailto:sgonzalez@josso.org">Sebastian Gonzalez Oyuela</a>
39: */
40: public class GenericServletSSOAgentRequest extends SSOAgentRequestImpl {
41:
42: private HttpServletRequest request;
43:
44: private HttpServletResponse response;
45:
46: /**
47: * This will hold JOSSO security context created by the agent during authentication.
48: */
49: private JOSSOSecurityContext ctx;
50:
51: public GenericServletSSOAgentRequest(int action, String sessionId,
52: LocalSession session, String assertionId) {
53: super (action, sessionId, session, assertionId);
54: }
55:
56: public GenericServletSSOAgentRequest(int action, String sessionId,
57: LocalSession session) {
58: super (action, sessionId, session);
59: }
60:
61: public void setRequest(HttpServletRequest request) {
62: this .request = request;
63: }
64:
65: public void setResponse(HttpServletResponse response) {
66: this .response = response;
67: }
68:
69: public HttpServletRequest getRequest() {
70: return request;
71: }
72:
73: public HttpServletResponse getResponse() {
74: return response;
75: }
76:
77: public void setSecurityContext(JOSSOSecurityContext ctx) {
78: this .ctx = ctx;
79: }
80:
81: public JOSSOSecurityContext getSecurityContext() {
82: return this.ctx;
83: }
84:
85: }
|