You are here

function oauth_auth_token in OAuth 1.0 6

Authorize a request token.

Redirects to login form if not logged in, and displays the grant access form once logged in.

1 string reference to 'oauth_auth_token'
oauth_menu in ./oauth.module
Implementation of hook_menu

File

./oauth.module, line 164

Code

function oauth_auth_token() {

  // Redirect to the right form, or present an error.
  global $user;
  if ($user->uid != 0) {
    if (user_access("authorize external services")) {
      return drupal_get_form("oauth_grant_access");
    }
    else {
      drupal_set_message("error", t("You are not authorized to allow external services access to this system."));
      drupal_access_denied();
    }
  }
  else {
    return drupal_get_form("user_login");

    //oauth_auth_token();
  }
}