Authentication Class¶
-
class
flask_jwt_router._authentication.
Authentication
[source]¶ Uses SHA-256 hash algorithm
-
create_token
(config: flask_jwt_router._config.Config, exp: int, **kwargs) → str[source]¶ - kwargs:
entity_id: Represents the entity’s primary key
table_name: The table name of the entity
- Parameters
config – See
_config
exp – The expiry duration set when encoding a new token
kwargs –
- Returns
Union[str, None]
-
encode_token
(config: flask_jwt_router._config.Config, entity_id: Any, exp: int, table_name) → str[source]¶ - Parameters
config – See
_config
entity_id – Normally the primary key id or user_id
exp – The expiry duration set when encoding a new token
table_name – The Model Entity __tablename__
- Returns
str
-
entity_id
: str = None¶ The reference to the entity ID.
-
update_token
(config: flask_jwt_router._config.Config, exp: int, table_name: str, **kwargs) → str[source]¶ - kwargs:
entity_id: Represents the entity’s primary key
- Parameters
config –
exp –
table_name –
- Returns
Union[str, None]
-