webepics / basic_ioc_interface

This contains containerized copies of the epics2web tomcat server, and two caproto testing IOCs.
2 stars 2 forks source link

JWT authorisation for `web_put` #28

Open mattaustin opened 5 years ago

mattaustin commented 5 years ago

This pull request is in relation to issue #2 - adding JWT to the web_put application:

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.

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 in web_put/src/webput/auth.py.

Let me know if JWT refresh token functionality is required.