- class splatnet3_scraper.auth.TokenManager
Manages the tokens used for authentication. Handles regeneration and interaction with the keychain. This class is meant to mostly be used via its “get” method
Constructors¶
-
TokenManager(nso=
None, ...) Initializes a
TokenManagerobject. TheTokenManagerobject handles the tokens used for authentication. It handles regeneration and interaction with the keychain. This class is meant to mostly be used via its “get” method.
Methods¶
-
add_token(token, name=
None, timestamp=None) Adds a token to the keychain. If the token is a string, the name of the token must be provided. If the token is a
Tokenobject, the name of the token will be used. If the token already exists, it will overwrite the existing token.
-
flag_origin(origin, data=
None) Flags the origin of the token manager. This is used to identify where the token manager was loaded from, if anywhere. This is used to help keep track of whether the user wants to save the tokens to disk or not, but can potentially be used for other things in the future. This is called automatically when the token manager is loaded from a config file or environment variables. Subsequent calls to this method will overwrite the previous origin.
- generate_bullet_token()
Generates a bullet token. This is done by calling the
TokenRegenerator.generate_bullet_tokenmethod. The token is then added to the keychain.
- generate_gtoken()
Generates a gtoken. This is done by calling the
TokenRegenerator.generate_gtokenmethod. The token is then added to the keychain.
- regenerate_tokens()
Regenerates all the tokens. This is done by calling the
TokenRegenerator.generate_all_tokensmethod. The tokens are then added to the keychain.
-
TokenManager(nso=