Property | Type | Description | |
---|---|---|---|
$config | array | Default configurations |
Method | Description | |
---|---|---|
CsrfToken ( array $config = [] ) : boolean | validate CSRF token CSRF token can be passed with submitted forms and links associated with sensitive server-side operations. | |
form ( array $config ) : boolean | validate submitted form - Unknown fields cannot be added to the form. | |
requireAjax ( array $actions = [] ) | Sets the actions that require a Ajax request | |
requireGet ( array $actions = [] ) | Sets the actions that require a GET request | |
requirePost ( array $actions = [] ) | Sets the actions that require a POST request | |
requireSecure ( array $actions = [] ) | Sets the actions that require secured connection(SSL) | |
startup ( ) | Auth startup All security checking are done in this method |
Method | Description | |
---|---|---|
invalidRequest ( string | null $callback = null ) : mixed | Handles invalid request with a 400 Bad Request Error If no callback is specified. | |
requestRequired ( ) : boolean | Check & validate from the required HTTP methods, like: Post, Ajax, Get | |
secureRequired ( ) : boolean | Check & validate if secured connection is required. | |
validateDomain ( ) : boolean | Check & validate if request is coming from the same domain; if equals to $this->request->host() HTTP referer tells the domain where the request came from. |
public requireAjax ( array $actions = [] ) | ||
$actions | array |
public requireGet ( array $actions = [] ) | ||
$actions | array |
public requirePost ( array $actions = [] ) | ||
$actions | array |
public requireSecure ( array $actions = [] ) | ||
$actions | array |
public startup ( ) |