UCL-ARC / dirac-swift-api

Repository for the REST API side of the DiRAC-SWIFT project
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Auth tokens tweaks #34

Closed harryjmoss closed 1 year ago

harryjmoss commented 1 year ago

Tidying up tests, adding authentication requirement to the SWIFT data endpoints.

This moves around some of the logic contained in virgo_auth.py in auth-tokens into auth.py, and adds a dependency into the FastAPI routes requiring a valid token in the header for access to any of the SWIFT data routes (so masked/unmasked datasets, metadata, units etc).

harryjmoss commented 1 year ago

@PeterAndrewBriscoe propose that we merge this into your branch and then continue with the PR #28, keeping your auth_tokens branch as the single source of truth.