You are here

function restful_csrf_session_token in RESTful 7.2

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

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

1 call to restful_csrf_session_token()
LoginCookie__1_0::getCSRFTokenValue in src/Plugin/resource/LoginCookie__1_0.php
Get the CSRF token string.

File

./restful.module, line 503

Code

function restful_csrf_session_token() {
  return array(
    'X-CSRF-Token' => drupal_get_token(\Drupal\restful\Plugin\authentication\Authentication::TOKEN_VALUE),
  );
}