wso2/jaggery-extensions — pull request #10 by Buddhima (2014-09-05 04:49:53+00:00)
Title: OAuth2 fix

Hi,
In addition to the changes in PR https://github.com/wso2/jaggery-extensions/pull/9, this PR do following changes:

In OAuth2, for authorizing phase, different services require different set of parameters. But current implementation is not capable of handling it. With this PR, you can set all those additional params for authorizing phase as follows:
```json
{
"oauth_version" : "2",
"authorization_url" : "https://accounts.google.com/o/oauth2/auth",
"access_token_url" : "https://accounts.google.com/o/oauth2/token",
"api_key" : "API_KEY.googleusercontent.com",
"api_secret" : "API_SECRET",
"callback_url"	: "http://127.0.0.1:9763/wso2",
"authorize_params": {
"state": "wso2oauthtrial",
"scope": "https://www.googleapis.com/auth/drive.readonly ",
"access_type":"offline",
"approval_prompt":"force"
}
}
```

I also put the 'scope' parameter inside 'authorize_params' since it's also not an essential one.