Open mattaustin opened 5 years ago
This pull request is in relation to issue #2 - adding JWT to the web_put application:
web_put
put
get_channels_status
create_app
login
A JWT access token is obtained by posting a username and password to /auth/login, and reading the access_token value in the JSON response.
/auth/login
access_token
An Authorization: Bearer <access_token> header should then be set when making requests to the protected views.
Authorization: Bearer <access_token>
I image you won't want to merge in this feature until the corresponding JWT handling is ready in the react app.
Currently a hard-coded list of users (user_list) is set in web_put/src/webput/auth.py.
user_list
web_put/src/webput/auth.py
Let me know if JWT refresh token functionality is required.
This pull request is in relation to issue #2 - adding JWT to the
web_put
application:put
andget_channels_status
).create_app
) - useful for test configurations.login
and protected view.A JWT access token is obtained by posting a username and password to
/auth/login
, and reading theaccess_token
value in the JSON response.An
Authorization: Bearer <access_token>
header should then be set when making requests to the protected views.I image you won't want to merge in this feature until the corresponding JWT handling is ready in the react app.
Currently a hard-coded list of users (
user_list
) is set inweb_put/src/webput/auth.py
.Let me know if JWT refresh token functionality is required.