# depicter/1.3.2/app/src/Controllers/Ajax/SecurityAjaxController.php

Depicter — Popup &amp; Slider Builder, version 1.3.2. 17 lines.

- Page: https://pluginprobe.com/plugins/depicter/1.3.2/code/app/src/Controllers/Ajax/SecurityAjaxController.php
- Raw: https://pluginprobe.com/plugins/depicter/1.3.2/raw/app/src/Controllers/Ajax/SecurityAjaxController.php
- Modified: 2022-07-25T11:57:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/depicter/1.3.2/code/app/src/Controllers/Ajax/SecurityAjaxController.php#L10-L20`.

```php
<?php
namespace Depicter\Controllers\Ajax;

use Depicter\Utility\Sanitize;
use WPEmerge\Requests\RequestInterface;

class SecurityAjaxController
{

	public function generateCsrfToken( RequestInterface $request, $view ) {
		$action = Sanitize::key( $request->body('key') );
		$action = empty( $action ) ? -1 : $action;

		return \Depicter::csrf()->getToken( $action );
	}
}

```
