This module provides a simple and secure way to authenticate with the easySSP API using JWT tokens. It performs the initial login with username and password, requests the access and refresh tokens from the authentication endpoint, and renews the access token when it expires using the refresh token.
- 🔑 Retrieves JSON Web Tokens (JWTs) based on user credentials
- 🗂️ Securely manages credentials and access/refresh tokens
- ♻️ Automatically renews expired access tokens
- Requires an easySSP Pro or Process Edition account
- Create the
AuthClient
instance
from easyssp_auth.authentication import AuthClient, AuthError
try:
auth_client = AuthClient("your_easyssp_username", "your_easyssp_password", "your-client-id")
except AuthError as ex:
print(ex)
- Retrieve the access token
access_token = auth_client.get_access_token()
- Authenticate your requests
You can use the retrieved access token in theAuthorization
header of your requests to authenticate with the easySSP API.
pip install easyssp-auth-client
Or clone and install from source:
git clone https://github.com/exxcellent/easyssp-auth-client-python.git
cd easyssp-auth-client-python
pip install -e .
easyssp_auth/
├── __init__.py
├── authentication.py # Core logic for obtaining and storing the token
- Python 3.11+
Install dependencies using uv:
pip install uv
uv sync
This module is maintained as part of the easySSP ecosystem. If you find issues or want to suggest improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.