function oauth_generate_consumer in OAuth 1.0 6
Generate a new consumer ID for a user.
Parameters
uid: User ID to generate the consumer record for
Return value
OAuthConsumer object for new client.
1 call to oauth_generate_consumer()
- oauth_get_consumer in ./
oauth.module - Return consumer object for a user
File
- ./
oauth.module, line 371
Code
function oauth_generate_consumer($uid) {
$key = user_password(32);
$secret = user_password(32);
oauth_save_consumer($uid, $key, $secret);
return new OAuthConsumer($key, $secret);
}