|
| _authtoken |
| Authorization header to send with each request.
|
|
Simple class to present bearer token instead of username/password
Definition at line 122 of file __init__.py.
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
token |
|
) |
| |
Construct from a token
Definition at line 125 of file __init__.py.
125 def __init__(self, token):
126 """Construct from a token"""
127
128 self._authtoken = f"Bearer {token}"
129
◆ __call__()
Update headers to include token
Definition at line 130 of file __init__.py.
130 def __call__(self, r):
131 """Update headers to include token"""
132 r.headers["X-Authorization"] = self._authtoken
133 return r
134
135
◆ _authtoken
Authorization header to send with each request.
Definition at line 128 of file __init__.py.
The documentation for this class was generated from the following file: