Verificar sesión de Flask

Verifica la firma o etiqueta con la clave adecuada; no sustituye la autorización de la aplicación.

Entrada: TextoResultado: JSON estructurado

Entrada de texto

Ejecuta para ver el resultado

Ejemplos

Example keys and passwords are public test material.

Flask Session: Verify Sha1

Entrada

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3I

Expected answer

JSON
{
    "valid": true,
    "payload": {
        "role": "superuser",
        "user": "admin"
    }
}
Clave
{"string":"mysecretkey","option":"UTF8"}
Sal
{"string":"cookie-session","option":"UTF8"}
Algoritmo
sha1
Ver marca de tiempo
Off
Flask Session: Verify Sha1 Wrong Key

Entrada

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3I

Expected rejection

Message contains
Invalid signature!
Clave
{"string":"notTheKey","option":"UTF8"}
Sal
{"string":"cookie-session","option":"UTF8"}
Algoritmo
sha1
Ver marca de tiempo
Off
Flask Session: Verify Sha1 Wrong Salt

Entrada

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3I

Expected rejection

Message contains
Invalid signature!
Clave
{"string":"mysecretkey","option":"UTF8"}
Sal
{"string":"notTheSalt","option":"UTF8"}
Algoritmo
sha1
Ver marca de tiempo
Off
Flask Session: Verify Sha256

Entrada

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8

Expected answer

JSON
{
    "valid": true,
    "payload": {
        "role": "superuser",
        "user": "admin"
    }
}
Clave
{"string":"mysecretkey","option":"UTF8"}
Sal
{"string":"cookie-session","option":"UTF8"}
Algoritmo
sha256
Ver marca de tiempo
Off
Flask Session: Verify Sha256 Wrong Key

Entrada

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8

Expected rejection

Message contains
Invalid signature!
Clave
{"string":"notTheKey","option":"UTF8"}
Sal
{"string":"cookie-session","option":"UTF8"}
Algoritmo
sha256
Ver marca de tiempo
Off
Flask Session: Verify Sha256 Wrong Salt

Entrada

eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8

Expected rejection

Message contains
Invalid signature!
Clave
{"string":"mysecretkey","option":"UTF8"}
Sal
{"string":"notTheSalt","option":"UTF8"}
Algoritmo
sha256
Ver marca de tiempo
Off

Herramientas relacionadas

Cifrado / Codificación

Referencia de la operación

Ver la documentación técnica original (English)