To avoid CSRF attacks we use a security token and validate the request against the token. This could be achieved through, the below code to generate a token
$link = JRoute::_('index.php?option=com_comp&view=comview&task=action'&'.JSession::getFormToken().'=1');
to validate the token
JSession::checkToken('get') or die( 'Invalid Token' );
and the link generates like... http://localhost/index.php?option=com_comp&view=comview&task=action&231a817c6f53a732b6d70f3e2c3c5fcd=1
Now my question is: This token code is not a one time use code, many requests on the same token can be made.
So this does not actually satisfy the purpose.
I think the generate token and check token must be related and once it is checked, the next time we get a token should change the value.
Is there any code or function in Joomla that can do this ?