01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999-2004 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library 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 library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: JonasSecuritySender.java 4804 2004-05-25 15:13:29Z benoitf $
23: * --------------------------------------------------------------------------
24: *
25: */package org.objectweb.jonas.security.interceptors.jeremie;
26:
27: import org.objectweb.security.propagation.SecuritySender;
28: import org.objectweb.security.context.SecurityCurrent;
29: import org.objectweb.security.context.SecurityContext;
30:
31: /**
32: * This class represents the implementation of a SecuritySender in JOnAS.
33: * @author Jeff Mesnil Contributor(s):
34: */
35: public class JonasSecuritySender implements SecuritySender {
36:
37: /**
38: * Empty constructor
39: */
40: public JonasSecuritySender() {
41: }
42:
43: /**
44: * we do not use the received security context to set it (EJB, v1.1, chapter
45: * 15.5)
46: */
47: public void received_reply(int request_id, SecurityContext ctx) {
48: }
49:
50: public SecurityContext sending_request(int request_id) {
51:
52: // Gets Current object (always existing in JOnAS Server)
53: SecurityCurrent current = SecurityCurrent.getCurrent();
54: if (current == null) {
55: return null;
56: }
57: // Get the Security Context
58: SecurityContext ctx = current.getSecurityContext();
59: return ctx;
60: }
61: }
|