Auth
Creds
A class to store and handle login credentials.
Parameters:
Name | Type | Description | Example |
---|---|---|---|
homeserver |
str | Url to homeserver | https://matrix.org |
username |
str | Bot username | mybot |
password |
str | Bot password | password123 |
login_token |
str | Login token. Can be used instead of password | asdfAWvZQweVHNt123... |
access_token |
str | Access token. Can be used instead of password | asdfAWvZQweVHNt123... |
session_stored_file |
str | Location to read and write session data | session.txt |
from_json static
Make credits object from .json file.
session_read_file
Reads and decrypts the device_id and access_token from file.
session_write_file
Encrypts and writes to file the device_id and access_token.