| Creation Date: | January 18, 2002 |
| Status: | Production |
| Version: | PDK Release 2, (9.0.2 and later) |
In the article How to Build a URL-Based Portlet with Single Sign-On to an External Application, you learned how to create a URL-based portlet that provided Single Sign-On to an external application requiring user credentials. The example used in that article was MyYahoo! Weather. PDK-URL Services also enables you to create URL-based portlets that provide Single Sign-On to URL applications that use basic authentication.
This article shows you how to create a URL-based portlet with Single Sign-On to an external application requiring basic authentication. The example used in this article is Oracle MetaLink.
Using a text editor, create an XML file for your portlet provider. Use the authentication and authType tags to specify that this portlet is to use basic authentication. You may use the sample XML file below (you must change the httpProxyHost and httpProxyPort values to point to your own proxy server and port). Please refer to the article Understanding provider.xml for URL-Based Portlets for an explanation of the required XML tags and their functions.
After you have created the file, save it somewhere on your file system and call it "provider.xml".
<?xml version = '1.0' encoding = 'UTF-8'?> <?providerDefinition version="3.1"?> <provider class="oracle.portal.provider.v2.http.URLProviderDefinition"> <providerInstanceClass>oracle.portal.provider.v2.http.URLProviderInstance</providerInstanceClass> <session>true</session> <authentication class="oracle.portal.provider.v2.security.Authentication"> <authType>basic</authType> </authentication> <proxyInfo class="oracle.portal.provider.v2.ProxyInformation"> <httpProxyHost>www-proxy.us.oracle.com</httpProxyHost> <httpProxyPort>80</httpProxyPort> </proxyInfo> <httpsProxyInfo class="oracle.portal.provider.v2.ProxyInformation"> <httpsProxyHost>www-proxy.us.oracle.com</httpsProxyHost> <httpsProxyPort>80</httpsProxyPort> </httpsProxyInfo> <portlet class="oracle.portal.provider.v2.http.URLPortletDefinition"> <id>1</id> <name>MetalinkPortlet</name> <title>Metalink Portlet</title> <description>This portlet displays an 3rd Party Application which uses Basic Authentication as a portlet. The 3rd party application is Oracle Metalink</description> <timeout>100</timeout> <timeoutMessage>Metalink portlet timed out</timeoutMessage> <showEdit>false</showEdit> <showEditDefault>false</showEditDefault> <showPreview>false</showPreview> <showDetails>false</showDetails> <hasHelp>false</hasHelp> <hasAbout>false</hasAbout> <acceptContentType>text/html</acceptContentType> <registrationPortlet>false</registrationPortlet> <renderer class="oracle.portal.provider.v2.render.RenderManager"> <showPage class="oracle.portal.provider.v2.render.http.URLRenderer"> <contentType>text/html</contentType> <pageUrl>http://metalink.oracle.com/metalink/plsql/sit_main.showSitemap?p_showTitle=0</pageUrl> <filter class="oracle.portal.provider.v2.render.HtmlFilter"> <headerTrimTag><body</headerTrimTag> <footerTrimTag>/body></footerTrimTag> <useAuthLinks>true</useAuthLinks> </filter> </showPage> </renderer> <securityManager class="oracle.portal.provider.v2.security.URLSecurityManager"> <authorizType>public</authorizType> </securityManager> </portlet> </provider>
To configure and deploy your provider on OC4J, please see the section called "Deploying Your Provider on OC4J" in the article, How to Build a URL-Based Portlet.
You now need to create a new external application in Oracle9iAS Portal for the Oracle MetaLink Portlet. This external application maps any given Portal user to a desired Oracle MetaLink account so that every Portal user can have Single Sign-On access to Oracle MetaLink.
If you are registering your provider on Oracle9iAS Portal 3.1, the registration wizard includes fields for both the provider URL and the service identifier (it will still include fields for name, display name, description, etc., see the steps below). You should specify both the URL and the service name.
For Oracle9iAS Portal 3.0.9, you must register the provider by appending the service ID to the provider URL as shown below.
Now add your new portlet to a page. If you have not already entered your MetaLink credentials into the Login Server, you will see a message telling you to Update Login Information. Click the link to enter your MetaLink account username and password. After entering your credentials you will see the MetaLink portlet.
Now that you have successfully created URL-based portlet with single sign-on to an application that uses basic authentication, please look for other portlet development articles that describe how to add extra features to your portlet, including single sign-on to external URL-based applications, XML filtering and more.
Here are some reference articles to help you better understand the architecture and technical details of URL-based portlets:
| Revision History: |
|
| Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065, USA http://www.oracle.com/ |
Worldwide Inquiries: 1-800-ORACLE1 Fax 650.506.7200 |
Copyright and Corporate Info |