Use case: need to customize the output of auth error messages returned by OAuth authentication via REST server.
services_oauth.module registers following auth info:
Array
(
[file] => services_oauth.inc
[title] => OAuth authentication
[description] => An open protocol to allow secure API authorization
[security_settings] => _services_oauth_security_settings
[default_security_settings] => _services_oauth_default_security_settings
[authenticate_call] => _services_oauth_authenticate_call
[controller_settings] => _services_oauth_controller_settings
)The, hook_services_authentication_info_alter() allows to easily replace callbacks, following example alters "authenticate_call":
function custom_services_authentication_info_alter(&$info, $module) {
$info['authenticate_call'] = '_custom_services_oauth_authenticate_call';
}
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| services.runtime-auth_alter.patch | 708 bytes | develcuy |
Comments
Comment #1
kylebrowning commentedFixed in dev.