01: /**
02: * $Id: PortletSSOAdapterSession.java,v 1.2 2005/09/28 20:30:24 rakeshn Exp $
03: * Copyright 2002 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and iPlanet
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.ssoadapter;
14:
15: import java.util.Locale;
16: import com.iplanet.sso.SSOToken;
17: import javax.portlet.PortletRequest;
18:
19: /**
20: * This class is a extension for SSOAdapterSession for use inside a Portlet.
21: * @version 1.0
22: * @see com.sun.ssoadapter.SSOAdapterFactory
23: * @see com.sun.ssoadapter.SSOAdapterException
24: */
25:
26: public class PortletSSOAdapterSession extends SSOAdapterSession {
27:
28: /**
29: * An Constructor with PortletRequest
30: * @param portletRequestParam
31: */
32: public PortletSSOAdapterSession(PortletRequest portletRequestParam) {
33: this (portletRequestParam, null, null, null, null);
34: }
35:
36: /**
37: * The Constructor
38: * @param pRequest PortletRequest
39: * @param clientTypeParam the clientType
40: * @param localeParam locale
41: * @param authlessUidParam the authlessUID
42: * @param instanceNameParam instanceName
43: */
44: public PortletSSOAdapterSession(PortletRequest pRequest,
45: String clientTypeParam, Locale localeParam,
46: String authlessUidParam, String instanceNameParam) {
47: super (getSSOToken(pRequest), clientTypeParam, localeParam,
48: authlessUidParam, instanceNameParam);
49: }
50:
51: /**
52: *
53: * @param portletRequest
54: * @return SSOToken : gets the SSOToken from the PortletRequest
55: */
56: public static SSOToken getSSOToken(PortletRequest portletRequest) {
57: SSOToken token = (SSOToken) portletRequest
58: .getAttribute("javax.portlet.portletc.ssotoken");
59: return token;
60: }
61:
62: }
|