This section is about configuring the oAuth 2 legs scenario in OpenSocial (Reference: [OpenSocial.org|http://docs.opensocial.org/display/OS/Home]) .

For more information, visit this article: [2-legged OAuth for the OpenSocial REST API|http://sites.google.com/site/oauthgoog/2leggedoauth/2opensocialrestapi] .
h1. Generate the certificates
To generate the key:

{code}
$ openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
     -out testkey.pem -subj '/CN=mytestkey'
$ openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
{code}

h1. Configure the property file {anchor:id=SOCref.Configuration.Configure_the_property_life}

Edit container.js and change the following parameter to point to your private key and key name.

{code}
"gadgets.signingKeyFile" : "oauth.pem",
"gadgets.signingKeyName" : "oauthKey",
{code}
