Generate and verify CSRF tokens
namespace
CSRF
namespace CSRF
- @param secret
The secret to use for the token. If not provided, a random default secret will be generated in memory and used.
@param optionsThe options for the token.
@returnsThe generated token.
- @param token
The token to verify.
@param optionsThe options for the token.
@returnsTrue if the token is valid, false otherwise.