Ubiquity\security\csrf$UCsrfHttp This class is part of Ubiquity.
More...
|
static | isValidPost (string $name) |
| Returns whether the given CSRF token is present and valid in POST values, given his name.
|
|
static | isValidCookie (string $name) |
| Returns whether the given CSRF token is present and valid in cookies, given his name.
|
|
static | isValidMeta (string $name) |
| Returns whether the given CSRF token is present and valid in header meta csrf-token, given his name.
|
|
static | getTokenMeta (string $name) |
| Adds a token in headers.
|
|
static | getTokenField (string $name) |
| Returns an input field with a generated token.
|
|
static | addCookieToken (string $name, string $path='/', bool $secure=true, bool $httpOnly=true) |
| Adds a token in cookies.
|
|
Ubiquity\security\csrf$UCsrfHttp This class is part of Ubiquity.
- Author
- jc
- Version
- 1.0.0
Definition at line 15 of file UCsrfHttp.php.
◆ addCookieToken()
static addCookieToken |
( |
string |
$name, |
|
|
string |
$path = '/' , |
|
|
bool |
$secure = true , |
|
|
bool |
$httpOnly = true |
|
) |
| |
|
static |
Adds a token in cookies.
- Parameters
-
string | $name | |
string | $path | |
bool | $secure | |
bool | $httpOnly | |
- Returns
- bool
Definition at line 93 of file UCsrfHttp.php.
◆ getTokenField()
static getTokenField |
( |
string |
$name | ) |
|
|
static |
Returns an input field with a generated token.
- Parameters
-
- Returns
- string
Definition at line 79 of file UCsrfHttp.php.
◆ getTokenMeta()
static getTokenMeta |
( |
string |
$name | ) |
|
|
static |
Adds a token in headers.
- Parameters
-
Definition at line 68 of file UCsrfHttp.php.
◆ isValidCookie()
static isValidCookie |
( |
string |
$name | ) |
|
|
static |
Returns whether the given CSRF token is present and valid in cookies, given his name.
- Parameters
-
- Returns
- bool
Definition at line 39 of file UCsrfHttp.php.
◆ isValidMeta()
static isValidMeta |
( |
string |
$name | ) |
|
|
static |
Returns whether the given CSRF token is present and valid in header meta csrf-token, given his name.
- Parameters
-
- Returns
- bool
Definition at line 55 of file UCsrfHttp.php.
◆ isValidPost()
static isValidPost |
( |
string |
$name | ) |
|
|
static |
Returns whether the given CSRF token is present and valid in POST values, given his name.
- Parameters
-
- Returns
- boolean
Definition at line 25 of file UCsrfHttp.php.
◆ COOKIE_KEY
const COOKIE_KEY = 'X-XSRF-TOKEN' |
|
private |
The documentation for this class was generated from the following file:
- C:/Users/myadd/Documents/GitHub/ubiquity-doc-api/vendor/phpmv/ubiquity-security/src/Ubiquity/security/csrf/UCsrfHttp.php