TokenAuth¶
Bases: BaseAuth
Authentication using a pre-supplied token
| ATTRIBUTE | DESCRIPTION |
|---|---|
endpoint |
The token to use for authentication (default: 'api/access-tokens')
TYPE:
|
Example
>>> auth = TokenAuth('<token>')
>>> auth.authenticate()
{'Authorization : 'Bearer <token>'}
Initialize a TokenAuth instance with a token
| PARAMETER | DESCRIPTION |
|---|---|
|
The token to use for authentication
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
authenticate |
Implementation of the authenticate method |
Source code in src/plankapy/v1/handlers.py
289 290 291 292 293 294 295 | |
authenticate
¶
Implementation of the authenticate method
| PARAMETER | DESCRIPTION |
|---|---|
|
Not used, but required by the protocol
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, str]
|
Headers with the token in the |
Source code in src/plankapy/v1/handlers.py
297 298 299 300 301 302 303 304 305 306 | |