You are here

function oauth_common_authorization_add in OAuth 1.0 7.3

Same name and namespace in other branches
  1. 6.3 oauth_common.authorizations.inc \oauth_common_authorization_add()
  2. 7.4 oauth_common.authorizations.inc \oauth_common_authorization_add()

Page callback to authorize a consumer.

Parameters

object $account: A user account object.

object $consumer: A DrupalOAuthConsumer instance.

1 string reference to 'oauth_common_authorization_add'
oauth_common_providerui_menu in ./oauth_common_providerui.module
Implements hook_menu().

File

./oauth_common.authorizations.inc, line 82
Functions related to a user's authorization section

Code

function oauth_common_authorization_add($account, $consumer) {
  $token = new DrupalOAuthToken(user_password(32), user_password(32), $consumer, array(
    'uid' => $account->uid,
  ));
  return drupal_get_form('oauth_common_form_authorization', $token);
}