Vérifier la session Flask

Vérifie signature ou code avec la clé adaptée, sans remplacer l’autorisation applicative.

Entrée: TexteRésultat: JSON structuré

Saisie de texte

Exécuter pour voir le résultat

Exemples

Example keys and passwords are public test material.

Flask Session: Verify Sha1

Entrée

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3I

Expected answer

JSON
{
    "valid": true,
    "payload": {
        "role": "superuser",
        "user": "admin"
    }
}
Clé
{"string":"mysecretkey","option":"UTF8"}
Sel
{"string":"cookie-session","option":"UTF8"}
Algorithme
sha1
Voir horodatage
Off
Flask Session: Verify Sha1 Wrong Key

Entrée

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3I

Expected rejection

Message contains
Invalid signature!
Clé
{"string":"notTheKey","option":"UTF8"}
Sel
{"string":"cookie-session","option":"UTF8"}
Algorithme
sha1
Voir horodatage
Off
Flask Session: Verify Sha1 Wrong Salt

Entrée

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3I

Expected rejection

Message contains
Invalid signature!
Clé
{"string":"mysecretkey","option":"UTF8"}
Sel
{"string":"notTheSalt","option":"UTF8"}
Algorithme
sha1
Voir horodatage
Off
Flask Session: Verify Sha256

Entrée

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8

Expected answer

JSON
{
    "valid": true,
    "payload": {
        "role": "superuser",
        "user": "admin"
    }
}
Clé
{"string":"mysecretkey","option":"UTF8"}
Sel
{"string":"cookie-session","option":"UTF8"}
Algorithme
sha256
Voir horodatage
Off
Flask Session: Verify Sha256 Wrong Key

Entrée

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8

Expected rejection

Message contains
Invalid signature!
Clé
{"string":"notTheKey","option":"UTF8"}
Sel
{"string":"cookie-session","option":"UTF8"}
Algorithme
sha256
Voir horodatage
Off
Flask Session: Verify Sha256 Wrong Salt

Entrée

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8

Expected rejection

Message contains
Invalid signature!
Clé
{"string":"mysecretkey","option":"UTF8"}
Sel
{"string":"notTheSalt","option":"UTF8"}
Algorithme
sha256
Voir horodatage
Off

Outils associés

Chiffrement / Encodage

Référence de l’opération

Voir la documentation technique originale (English)