net.token

Module Contents

Functions

get_payload(→ dict)

Get payload from a JSON Web Token.

is_valid(→ bool)

Return true if the token is still valid, false otherwise.

net.token.get_payload(token: str) dict

Get payload from a JSON Web Token.

Parameters:

token – token

Returns:

decoded payload

net.token.is_valid(token: str) bool

Return true if the token is still valid, false otherwise.

Parameters:

token – full token

Returns:

return true if the token is still valid, false otherwise