0N/A------------------------------------------------------------------------
2362N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0N/ACopyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
0N/AThe contents of this file are subject to the terms
2362N/Aof the Common Development and Distribution License
0N/A(the License). You may not use this file except in
2362N/Acompliance with the License.
0N/AYou can obtain a copy of the License at
0N/ASee the License for the specific language governing
0N/Apermission and limitations under the License.
0N/AWhen distributing Covered Code, include this CDDL
0N/AHeader Notice in each file and include the License file
0N/AIf applicable, add the following below the CDDL Header,
2362N/Awith the fields enclosed by brackets [] replaced by
2362N/Ayour own identifying information:
2362N/A"Portions Copyrighted [year] [name of copyright owner]"
0N/A$Id: README,v 1.4 2010/01/11 07:07:44 nithyas Exp $
0N/A------------------------------------------------------------------------
0N/AThis README explains steps to configure and deploy a REST based sample
0N/Aand secure it using OpenSSO OAuth Token Service.
0N/A %% 2. Deploy and configure OpenSSO
0N/A %% 4. Build and run the Stock Client
0N/AYou must have the following software installed and running to be able
Deploy and configure
opensso.war using the Glassfish admin console.
change the tags <PROTOCOL>, <HOST>, <PORT> and <DEPLOYURI> to the
protocol, host(FQDN), and port of glassfish server on which the
OpenSSO server is hosted. Save the change.
change the tags <PROTOCOL>, <HOST>, <PORT>, and <DEPLOYURI> to the
protocol, host(FQDN), and port of the glassfish server on which the
OpenSSO server is hosted.
change the tags <PROTOCOL-STOCKSERVICE>, <HOST-STOCKSERVICE>, and
<PORT-STOCKSERVICE> to the protocol, host(FQDN), and port of the
glassfish server on which the sample stock service is hosted.
The OpenSSO OAuth implementation supports all three signature
methods,
i.e. HMAC-SHA1, RSA-SHA1, and PLAINTEXT.
By default, this sample uses HMAC-SHA1. You may test
different signature methods from the jsp page.
<PROTOCOL-STOCKCLIENT>://<HOST-STOCKCLIENT>:<PORT-STOCKCLIENT>/StockClient
using a browser (replace the tags <PROTOCOL-STOCKCLIENT>,
<HOST-STOCKCLIENT>, and <PORT-STOCKCLIENT> with the protocol,
host(FQDN), and port of the glassfish server on which this sample
A page diplayed with a text field labelled "Stock Symbol", list box
labelled "Signature Method", and a button "GetQuote".
Enter a valid stock symbol such as JAVA in the text field,
change the signature method, (if required)
and click on the GetQuote button.
After authentication is successful, an OAuth Authorization page is
displayed with the user's uuid and two buttons labelled "Authorize"
After clicking on the Authorize button, the stock quote should be
shown in a format similar to the following:
<Company>Sun Microsystems</Company>
<Time>10/14/2009 4:00pm</Time>
<YearRange>9.12</YearRange>
<MarketCap>0.00</MarketCap>