Mecha CMS

Deep learning on using the API.

Class Guardian

Author: Taufik Nurrohman · 114 Views

Tweet

Basic security.

Table of Content

Hash 

Guardian::hash($salt = "");

Token 

Guardian::token($id = 0);

Check Token 

Guardian::check($token, $id = 0, $fail = false);

Kick 

Guardian::kick($path = "");

Example:

Redirect to http://mecha-cms.com/foo/bar:

Guardian::kick('foo/bar');

Redirect to http://example.com:

Guardian::kick('http://example.com');

Abort 

Guardian::abort($message, $exit = true);