You are here

function nodejs_auth_get_token in Node.js integration 7

Same name and namespace in other branches
  1. 8 nodejs.module \nodejs_auth_get_token()

Get an auth token for the current user.

1 call to nodejs_auth_get_token()
nodejs_get_config in ./nodejs.module
Get nodejs server config.

File

./nodejs.module, line 635

Code

function nodejs_auth_get_token($account) {
  $nodejs_auth_get_token_callback = variable_get('nodejs_auth_get_token_callback', 'nodejs_auth_get_token_callback');
  if (!function_exists($nodejs_auth_get_token_callback)) {
    throw new Exception("Cannot proceed without a valid nodejs_auth_get_token callback - looked for '{$nodejs_auth_get_token_callback}'.");
  }
  return $nodejs_auth_get_token_callback($account);
}