oracle.clex.util
Class PartnerSSOEnabler

java.lang.Object
  |
  +--oracle.clex.util.PartnerSSOEnabler

public class PartnerSSOEnabler
extends java.lang.Object

Serves as a helper for integrating the MVC Framework applications with Oracle Portal Login Server. This class is based on one by the same name done for the Java Partner Application demo found in the PDK (Portlet Development Kit).


Field Summary
static java.lang.String LISTENER_TOKEN
          Constant for listenerToken constructor parameter key.
static java.lang.String ON_CANCEL_URL
          Constant for onCancelUrl constructor parameter key.
static java.lang.String PARTNER_APP_COOKIE_DESC
          Constant for partnerAppCookieDesc constructor parameter key.
static java.lang.String PARTNER_APP_COOKIE_DOMAIN
          Constant for partnerAppCookieDomain constructor parameter key.
static java.lang.String PARTNER_APP_COOKIE_NAME
          Constant for partnerAppCookieName constructor parameter key.
static java.lang.String PARTNER_APP_COOKIE_SCOPE
          Constant for partnerAppCookieScope constructor parameter key.
static java.lang.String PROVIDER_NAME
          Constant for cleProviderName constructor parameter key.
static java.lang.String REQUESTED_URL
          Constant for requestedUrl constructor parameter key.
 
Constructor Summary
PartnerSSOEnabler()
           
PartnerSSOEnabler(java.lang.String pListenerToken, java.lang.String pRequestedUrl, java.lang.String pOnCancelUrl, java.lang.String pPappCookieName, java.lang.String pPappCookieDomain, java.lang.String pPappCookieScope, java.lang.String pPappCookieDesc, java.lang.String pCleProviderName)
           
 
Method Summary
 java.lang.String bakeAppCookie(java.lang.Object sessionId, java.lang.String unbakedAppCookie)
          bakeAppCookie encrypts a cookie.
 java.lang.String getAppCookieDesc()
           
 java.lang.String getAppCookieDomain()
           
 java.lang.String getAppCookieName()
           
 java.lang.String getAppCookieScope()
           
 java.lang.String getBakedUserInfo(javax.servlet.http.HttpServletRequest request)
          Get user information from JSP application cookie Note: The method returns user information that is encrypted.
 java.lang.String getSSOUserInfo(javax.servlet.http.HttpServletRequest request)
          getSSOUserInfo(HttpServletRequest) returns the user name.
 java.lang.String getSSOUserInfo(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          getSSOUserInfo(HttpServletRequest, HttpServletResponse) returns the user name.
 java.lang.String process(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This method receives the requests, and makes the proper calls.
 void removeAppCookie(javax.servlet.http.HttpServletResponse response)
          Removes the partner application cookie.
 void setAppCookieInfo(java.lang.String name, java.lang.String domain, java.lang.String path, java.lang.String desc)
           
 void setListenerToken(java.lang.String listenerToken)
           
 boolean setPartnerAppCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          setPartnerAppCookie will set application cookie from SSO server token and then redirect user to the JSP application.
 void setUrls(java.lang.String requestedUrl, java.lang.String cancelUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LISTENER_TOKEN

public static final java.lang.String LISTENER_TOKEN
Constant for listenerToken constructor parameter key. For use in servlet init params, for example

REQUESTED_URL

public static final java.lang.String REQUESTED_URL
Constant for requestedUrl constructor parameter key. For use in servlet init params, for example

ON_CANCEL_URL

public static final java.lang.String ON_CANCEL_URL
Constant for onCancelUrl constructor parameter key. For use in servlet init params, for example

PARTNER_APP_COOKIE_NAME

public static final java.lang.String PARTNER_APP_COOKIE_NAME
Constant for partnerAppCookieName constructor parameter key. For use in servlet init params, for example

PARTNER_APP_COOKIE_DOMAIN

public static final java.lang.String PARTNER_APP_COOKIE_DOMAIN
Constant for partnerAppCookieDomain constructor parameter key. For use in servlet init params, for example

PARTNER_APP_COOKIE_SCOPE

public static final java.lang.String PARTNER_APP_COOKIE_SCOPE
Constant for partnerAppCookieScope constructor parameter key. For use in servlet init params, for example

PARTNER_APP_COOKIE_DESC

public static final java.lang.String PARTNER_APP_COOKIE_DESC
Constant for partnerAppCookieDesc constructor parameter key. For use in servlet init params, for example

PROVIDER_NAME

public static final java.lang.String PROVIDER_NAME
Constant for cleProviderName constructor parameter key. For use in servlet init params, for example
Constructor Detail

PartnerSSOEnabler

public PartnerSSOEnabler()

PartnerSSOEnabler

public PartnerSSOEnabler(java.lang.String pListenerToken,
                         java.lang.String pRequestedUrl,
                         java.lang.String pOnCancelUrl,
                         java.lang.String pPappCookieName,
                         java.lang.String pPappCookieDomain,
                         java.lang.String pPappCookieScope,
                         java.lang.String pPappCookieDesc,
                         java.lang.String pCleProviderName)
Method Detail

setListenerToken

public void setListenerToken(java.lang.String listenerToken)

setUrls

public void setUrls(java.lang.String requestedUrl,
                    java.lang.String cancelUrl)

setAppCookieInfo

public void setAppCookieInfo(java.lang.String name,
                             java.lang.String domain,
                             java.lang.String path,
                             java.lang.String desc)

getAppCookieName

public java.lang.String getAppCookieName()

getAppCookieDomain

public java.lang.String getAppCookieDomain()

getAppCookieScope

public java.lang.String getAppCookieScope()

getAppCookieDesc

public java.lang.String getAppCookieDesc()

getSSOUserInfo

public java.lang.String getSSOUserInfo(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws oracle.security.sso.enabler.SSOEnablerException
getSSOUserInfo(HttpServletRequest, HttpServletResponse) returns the user name. If the user is not authenticated against SSO server then it will redirect user to the SSO Server for authentication

getSSOUserInfo

public java.lang.String getSSOUserInfo(javax.servlet.http.HttpServletRequest request)
                                throws oracle.security.sso.enabler.SSOEnablerException
getSSOUserInfo(HttpServletRequest) returns the user name. If the user is not authenticated against the SSO server then the method will return null.

Usage: This method is used in portlets to check if a user is authenticated.


getBakedUserInfo

public java.lang.String getBakedUserInfo(javax.servlet.http.HttpServletRequest request)
                                  throws oracle.security.sso.enabler.SSOEnablerException
Get user information from JSP application cookie Note: The method returns user information that is encrypted.

setPartnerAppCookie

public boolean setPartnerAppCookie(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response)
                            throws oracle.security.sso.enabler.SSOEnablerException
setPartnerAppCookie will set application cookie from SSO server token and then redirect user to the JSP application. If the cookie is created and the user is redirected then the method will return true. If the SSO server token was not passed then the method returns false. The SSO server token is passed by the SSO server when the sso server is redirecting back to the JSP application after sucessful user authentication.

bakeAppCookie

public java.lang.String bakeAppCookie(java.lang.Object sessionId,
                                      java.lang.String unbakedAppCookie)
                               throws oracle.security.sso.enabler.SSOEnablerException
bakeAppCookie encrypts a cookie.

removeAppCookie

public void removeAppCookie(javax.servlet.http.HttpServletResponse response)
                     throws oracle.security.sso.enabler.SSOEnablerException
Removes the partner application cookie. This ends the user application session

process

public java.lang.String process(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res)
                         throws java.lang.Exception
This method receives the requests, and makes the proper calls. If the user is logged in correctly
Parameters:
req - Servlet request object.
res - Servlet response object.


Copyright © 2003 ORACLE Corp. All Rights Reserved.