You are here

function restful_csrf_session_token in RESTful 7

Same name and namespace in other branches
  1. 7.2 restful.module \restful_csrf_session_token()

Page callback: returns a session token for the currently active user.

1 call to restful_csrf_session_token()
RestfulUserLoginCookie::loginAndRespondWithCookie in plugins/restful/user/login_cookie/1.0/RestfulUserLoginCookie.class.php
Login a user and return a JSON along with the authentication cookie.

File

./restful.module, line 777

Code

function restful_csrf_session_token() {
  return array(
    'X-CSRF-Token' => drupal_get_token(\RestfulInterface::TOKEN_VALUE),
  );
}