You are here

function oauth_common_ahah_secret in OAuth 1.0 6.3

AHAH callback to retrieve the secret of OAuth objects.

Parameters

object $object:

Return value

void

1 string reference to 'oauth_common_ahah_secret'
oauth_common_providerui_menu in ./oauth_common_providerui.module
Implementation of hook_menu().

File

./oauth_common.inc, line 91

Code

function oauth_common_ahah_secret($object) {
  $cached_form_state = array();
  $form = form_get_cache($_POST['form_build_id'], $cached_form_state);
  form_set_cache($_POST['form_build_id'], $form, $cached_form_state);
  $form_state = array(
    'submitted' => FALSE,
  );
  $secret = array(
    '#prefix' => '',
    '#value' => $object->secret,
  ) + $form['secret'];
  $secret = form_builder('oauth_common_ahah_secret', $secret, $form_state);
  $output = drupal_render($secret);
  print drupal_to_js(array(
    'status' => TRUE,
    'data' => $output,
  ));
  exit;
}