Authentication
Authentication ¶
Bases: ABC
Base class for authentication methods.
Source code in src/signalbot/auth.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
write_header ¶
Adds the authorization header to the given headers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
headers
|
dict[str, str]
|
The dictionary to which the authorization header will be added. |
required |
Source code in src/signalbot/auth.py
18 19 20 21 22 23 24 | |
BasicAuthentication
dataclass
¶
Bases: Authentication
Username and password based authentication.
Attributes:
| Name | Type | Description |
|---|---|---|
username |
str
|
The username for the authentication. |
password |
str
|
The password used for authentication. |
Source code in src/signalbot/auth.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
BearerAuthentication
dataclass
¶
Bases: Authentication
Token based authentication.
Attributes:
| Name | Type | Description |
|---|---|---|
token |
str
|
The token used for authentication. |
Source code in src/signalbot/auth.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |