jclouds/labs/oauth
adriancole 2b0ad28f26 [maven-release-plugin] prepare release jclouds-1.6.0-alpha.2 2013-02-04 17:30:44 -08:00
..
src issue #1089 removed default timeout values so that those not using async will have simpler debugging 2013-01-29 04:19:00 -08:00
README oauth v2 implementation 2012-11-07 17:02:39 -06:00
pom.xml [maven-release-plugin] prepare release jclouds-1.6.0-alpha.2 2013-02-04 17:30:44 -08:00

README

In order to use oauth applications must specify the following properties:

Mandatory:
<myprovider>.identity - the oauth identity (e.g., service account email in Google Api's)
<myprovider>.credential - the private key used to sign requests, in pem format
oauth.endpoint - the endpoint to use for authentication (e.g., "http://accounts.google.com/o/oauth2/token" in Google Api's)
oauth.audience - the "audience" of the token request (e.g., "http://accounts.google.com/o/oauth2/token" in Google Api's)

Optional:
- each application may expose a Map<String,String> of additional claims to be added to the token request,
these should be annotated/named with "oauth.additional-claims"
oauth.signature-or-mac-algorithm  - the algorithms to use when signing the token request.

Running the live test:

mvn clean install -Plive\
 -Dtest.oauth.identity=<accout email>\
 -Dtest.oauth.credential=<accout pk in pem format>\
 -Dtest.oauth.endpoint=https://accounts.google.com/o/oauth2/token\
 -Dtest.jclouds.oauth.audience=https://accounts.google.com/o/oauth2/token\
 -Dtest.jclouds.oauth.signature-or-mac-algorithm=RS256\
 -Dtest.jclouds.oauth.scopes=https://www.googleapis.com/auth/prediction