function oauth2_server_test_oauth2_server_user_claims_alter in OAuth2 Server 2.0.x
Same name and namespace in other branches
- 8 tests/modules/oauth2_server_test/oauth2_server_test.module \oauth2_server_test_oauth2_server_user_claims_alter()
- 7 tests/oauth2_server_test.module \oauth2_server_test_oauth2_server_user_claims_alter()
Implements hook_oauth2_server_user_claims_alter().
File
- tests/
modules/ oauth2_server_test/ oauth2_server_test.module, line 13 - Support module for OAuth2 Server testing.
Code
function oauth2_server_test_oauth2_server_user_claims_alter(&$context) {
if (in_array('phone', $context['requested_scopes'])) {
$context['claims']['phone_number'] = '123456';
$context['claims']['phone_number_verified'] = FALSE;
}
}