Class to assist in using authentication tokens (useful to help avoid Cross-Site Request Forgery (CSRF) attacks)
See DBRow Class constructor
# # Table structure for table 'tokens' # CREATE TABLE tokens ( id varchar(127) NOT NULL default '', action varchar(64) default NULL, timestamp int(11) default NULL, valid_time int(11) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM;
string id - Unique identifier
string action - Permitted action associated with this token
int timestamp - UNIX timestamp of token creation
int valid_time - The number of seconds which this token is valid for, from timestamp
::ExpungeAllExpired - Expunge all expired tokens
::Generate - Generate a new token
::Initialise - Clear the object properties
::Refresh - Refresh a token
::Validate - Validate a token
See also DBRow Class.
| You are here: Home > Documentation > Token Class |