Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias alias ImportFrom alias alias alias alias Assign NameStore TupleLoad Str ClassDef bases NameLoad body Expr Str Assign NameStore Dict Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Str Assign NameStore TupleLoad Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Str Return Call AttributeLoad Call NameLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Str AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad Call AttributeLoad Str attr NameLoad NameLoad attr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpBitAnd Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Return CompareGt Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareNotEq NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd CompareIn NameLoad AttributeLoad NameLoad attr NameLoad body If CompareIn NameLoad ListLoad Str Str body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler body Raise Call NameLoad If Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Raise Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad If Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Return NameLoad decorator_list decorator_list
N/A N/A 
    Token managers, proposed for generating/validating tokens.
 N/A hashlib N/A hmac N/A json N/A time base64 b64encode b64decode aiorest_ws.auth.token.exceptions ParsingTokenException InvalidSignatureException TokenNotBeforeException TokenExpiredException N/A __all__ N/A JSONWebTokenManager JSONWebTokenManager N/A object N/A N/A JSON Web Token (or shortly JWT) manager for the aiorest-ws library.

    This manager written under inspire of the articles below:
        https://scotch.io/tutorials/the-anatomy-of-a-json-web-token
        https://en.wikipedia.org/wiki/JSON_Web_Token
     N/A HASH_FUNCTIONS N/A HS256 HS384 HS512 N/A hashlib sha256 N/A hashlib sha384 N/A hashlib sha512 N/A HASH_ALGORITHM HS256 N/A SECRET_KEY secret_key N/A RESERVED_NAMES N/A iss sub aud exp nbf ait jti _encode_data N/A N/A self data N/A N/A N/A Encode passed data to base64.

        :param data: dictionary object.
         N/A data N/A N/A N/A N/A json dumps data encode utf-8 N/A N/A N/A N/A b64encode data decode utf-8 N/A _decode_data N/A N/A self data N/A N/A N/A Decode passed data to JSON.

        :param data: dictionary object.
         N/A data N/A N/A N/A b64decode data decode utf-8 N/A N/A N/A json loads data N/A _generate_header N/A N/A self N/A N/A N/A Generate header for the token. N/A header N/A N/A self _encode_data N/A typ alg JWT N/A self HASH_ALGORITHM N/A header N/A _generate_payload N/A N/A self data N/A N/A N/A Generate payload for the token.

        :param data: dictionary object.
         N/A payload N/A N/A self _encode_data data N/A payload N/A _generate_signature N/A N/A self header payload N/A N/A N/A Generate signature for the token.

        :param header: token header.
        :param payload: token payload.
         N/A key N/A N/A N/A self SECRET_KEY encode utf-8 N/A data N/A N/A N/A N/A {0}.{1} format header payload encode utf-8 N/A hash_func N/A N/A self HASH_FUNCTIONS N/A N/A self HASH_ALGORITHM N/A hmac_obj N/A N/A hmac new key data digestmod hash_func N/A digest N/A N/A N/A N/A hmac_obj hexdigest encode utf-8 N/A signature N/A N/A N/A b64encode digest decode utf-8 N/A signature N/A _used_reserved_keys N/A N/A self data N/A N/A N/A Get set of used reserved keys. N/A N/A N/A set N/A N/A data keys N/A set N/A self RESERVED_NAMES N/A _check_token_timestamp N/A N/A self token key N/A N/A N/A Check token timestamp.

        :param token: dictionary object.
        :param key: field of token as a string.
         N/A token_timestamp N/A N/A token get key None N/A token_timestamp N/A N/A N/A N/A N/A time time N/A float token_timestamp N/A False N/A _is_invalid_signature N/A N/A self header payload token_signature N/A N/A N/A Validate token by signature.

        :param header: header of token.
        :param payload: payload of token.
        :param token_signature: signature of token as a string.
         N/A server_signature N/A N/A self _generate_signature header payload N/A N/A token_signature server_signature N/A N/A True N/A False N/A _is_not_be_accepted N/A N/A self token N/A N/A N/A Check for token is can be accepted or not.

        :param token: dictionary object.
         N/A N/A N/A self _check_token_timestamp token nbf N/A _is_expired_token N/A N/A self token N/A N/A N/A Check for token expired or not.

        :param token: dictionary object.
         N/A N/A N/A self _check_token_timestamp token exp N/A set_reserved_attribute N/A N/A self token attribute value N/A N/A N/A Set for token reserved attribute.

        :param token: dictionary object.
        :param attribute: updated reserved field of JSON Web Token.
        :param value: initialized value.
         N/A N/A N/A attribute N/A self RESERVED_NAMES value N/A N/A N/A attribute N/A exp nbf N/A N/A current_time_in_seconds N/A int N/A N/A time time N/A expired_timestamp N/A current_time_in_seconds value N/A N/A N/A token update N/A attribute expired_timestamp N/A N/A N/A token N/A attribute value N/A generate N/A N/A self data N/A args kwargs N/A N/A Generate token.

        :param data: dictionary, which will be stored inside token.
        :param args: tuple of arguments.
        :param kwargs: dictionary of reserved JSON Web Token fields, which
                       shall be overridden for token.
         N/A defined_attrs N/A N/A self _used_reserved_keys kwargs N/A key defined_attrs N/A N/A N/A N/A self set_reserved_attribute data key N/A kwargs N/A key N/A header N/A N/A self _generate_header N/A payload N/A N/A self _generate_payload data N/A signature N/A N/A self _generate_signature header payload N/A token N/A N/A {0}.{1}.{2} format header payload signature N/A token N/A verify N/A N/A self token N/A N/A N/A Verify passed token.

        :param token: validated token (as `header.payload.signature`).
         N/A N/A N/A N/A header payload signature N/A N/A token split . N/A N/A N/A N/A N/A ParsingTokenException N/A N/A N/A self _is_invalid_signature header payload signature N/A N/A N/A InvalidSignatureException N/A token_data N/A N/A self _decode_data payload N/A N/A N/A self _is_not_be_accepted token_data N/A N/A N/A TokenNotBeforeException N/A N/A N/A self _is_expired_token token_data N/A N/A N/A TokenExpiredException N/A token_data N/A N/A