Auth Helpers

Documentation Status

This is a library designed to help Python developers building FastAPI services for SKAO secure their applications. You don’t need to be familiar with the details of OAuth2, but in a nutshell, clients will be sending access tokens to your applications – these are JWTs containing claims about users – and this library will help you interpret those tokens and either grant or deny access to your application’s protected resources.

To use this library

If you are an SKAO application developer looking to use this library to secure your application.

Installation

Add it to your project dependencies in pyproject.toml, requirements.txt or similar.

For example:

uv add ska_aaa_authhelpers

If you’re using a different package manager, add ska_aaa_authhelpers with the equivalent command for that tool.

Usage

See the Cheatsheet – If you just want a quick copy-paste example, or…

Read Securing your application – for a step-by-step guide to adding authorisation to your app.

To improve this library

Merge requests are very much welcome! If you’re interested in making contributions or fixing bugs in these tools, please see Developing Authhelpers

Other resources