Downloads
Release notes
Breaking changes
A breaking change in this release is a move to define API-versions of exported OAuth contexts. This has been supported before by the Chaos tools module that we use for exports, but we hadn't used it. To enable easier API-changes in the future we wanted to make this move prior to releasing a stable version of 6.x-3.0.
Noteworthy changes
- Old nonces will no longer fill the database, it's cleaned on cron thanks to SimmeLj
- Fewer dependencies. We managed to make Inputstream optional for everyone and Chaos tool optional for those only needing the client part of the module
Update current exports
If you're currently relying on exported OAuth contexts (and doesn't have a copy of these in the database to re-export), then do this to upgrade them to work with the new version:
1. Add hook_ctools_plugin_api()
Define that you support version one of the oauth api in your module's hook_ctools_plugin_api() - can look something like this:
/**
* Implementation of hook_ctools_plugin_api().
*/
function example_ctools_plugin_api($module, $api) {
if ($module == 'oauth_common' && $api == 'oauth') {
return array('version' => 1);
}
}
2. Move hook_default_oauth_common_context() to example.oauth.inc
Your current hook_default_oauth_common_context() should be moved to a newly created file named with your module's name prefixed with ".oauth.inc".
3. Add version number to exported objects
Add "$context->api_version = 1;" below your exported objects' "$context->disabled = FALSE;" (or anywhere - but this is where Chaos tools puts the information). It should look similar to:
$context = new stdClass;
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 1;
$context->name = 'example';
$context->title = 'Example Context';
All changes since 6.x-3.0-beta2:
- by voxpelli: Fixed user consumer listing
- by hugowetterberg: Fixed handling of empty and 'oob' callback urls.
- by SimmeLj, voxpelli: Added removal of old non-used nonces on cron
- #899506: Missing class in oauth_common_autoload_info()
by nicholasThompson, ezra-g: Fixed missing class in oauth_common_autoload_info() - by voxpelli: Fixed bug assigning context to OAuthServer
- by voxpelli: Code cleanup
- by voxpelli: Made inputstream a suggestion instead of a dependency
- by voxpelli: Made ctools an optional recommendation instead of a dependency
- by voxpelli: Changed to use API-version in ctools exports