HTML::...tToken(3pm)

πŸ“¦
version 0.40068 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute

πŸ’– NAME πŸ’–

Bestie, welcome to the HTML::FormHandler::Field::RequestToken(3pm) page β€” the one your header shows as HTML::...tToken(3pm) β€” part of the User Contributed Perl Documentation. This is a hidden text field that contains a unique time-stamped token. Periodt. ✨

🌸 VERSION 🌸

This is version 0.40068. Slay. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the code vibe, bestie:

    with 'HTML::FormHandler::Field::Role::RequestToken';
    ...
    has_field '_token' => (
        type => 'RequestToken',
    );

πŸ”₯ DESCRIPTION πŸ”₯

Okay so this field exists to prevent CSRF attacks. It contains an encrypted token that has an expiration time for the form inside it. The big flex? No data needs to be persisted in the user's session or on the server. None. Zero. Nada. πŸ’…

πŸŽ€ ATTRIBUTES πŸŽ€

✨ expiration_time ✨

It's the length of time (in seconds) that the token will be accepted as valid from the time it is initially generated. Defaults to 3600.

✨ token_prefix ✨

An optional string to prepend to the token value before encrypting it. If specified, any received tokens must begin with this value to be accepted as valid. Defaults to an empty string.

Passed on form process: $c->sessionid . '|'

✨ crypto_key ✨

Key to use to encrypt/decrypt the token payload. πŸ”‘

✨ crypto_cipher_type ✨

The Crypt::CBC cipher to use to encrypt/decrypt the token payload. Defaults to Blowfish.

✨ message ✨

Error message if token is missing/invalid. 🚨

✨ cipher ✨

A Crypt::CBC object to handle encrypting/decrypting the token payload. If not specified, crypto_key and crypto_cipher_type will be used to construct one. 🧚

✨ verify_token ✨

Validates whether the specified token is currently valid for this form. βœ…

✨ get_token ✨

Generates a new token and returns it. 🎁

πŸ‘‘ AUTHOR πŸ‘‘

FormHandler Contributors - see HTML::FormHandler. 🫢

This software is copyright (c) 2017 by Gerda Shank. πŸ’–

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


Okay, that's the whole page, bestie. This footer energy came from perl v5.34.0, dated 2022-03-25, on the HTML::...tToken(3pm) page. Mwah πŸ’‹

πŸ“¦ where this page comes from