token
mlte/backend/api/endpoints/token.py
Token endpoint.
BEARER_TOKEN_TYPE = 'bearer'
module-attribute
Bearer token type.
GRANT_TYPE_PASSWORD = 'password'
module-attribute
Grant type name used in token requests.
TOKEN_ENDPOINT_URL = '/token'
module-attribute
The relative URL of the endpoint.
TokenResponse
Bases: BaseModel
Model for the token response to return.
Source code in mlte/backend/api/endpoints/token.py
31 32 33 34 35 36 37 38 39 40 41 |
|
access_token
instance-attribute
The actual encoded token.
expires_in
instance-attribute
Lifetime in seconds of the token.
token_type
instance-attribute
The token type.
create_token_response(access_token)
Creates a Bearer Token response with the given access token.
Source code in mlte/backend/api/endpoints/token.py
44 45 46 47 48 49 50 |
|
login_for_access_token(form_data)
async
OAuth 2 Access Server Token Endpoint. Assumes use of JWT Bearer tokens, with username being the embedded information. Currently only supports RO Credentials ("password") grant type.
Source code in mlte/backend/api/endpoints/token.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|