Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ jobs:
id: release
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Install poetry
if: ${{ steps.release.outputs.release_created }}
run: pipx install poetry
- uses: actions/setup-python@v5
if: ${{ steps.release.outputs.release_created }}
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
if: ${{ steps.release.outputs.release_created }}
- run: python3 -m build
python-version: '3.11'
cache: 'poetry'
- run: poetry install --without dev
if: ${{ steps.release.outputs.release_created }}
- uses: pypa/gh-action-pypi-publish@release/v1
- run: poetry publish --build --username __token__ --password ${{ secrets.PYPI_PASSWORD }}
if: ${{ steps.release.outputs.release_created }}
with:
password: ${{ secrets.PYPI_PASSWORD }}
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
python-version: '3.11'
cache: 'poetry'
- name: Install deps
run: pip install -r requirements.txt
run: poetry install
- name: Run tests
run: python -m coverage run -m pytest
run: poetry run pytest
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
USERNAME: ${{ secrets.USERNAME }}
USERNAME2: ${{ secrets.USERNAME2 }}
PASSWORD: ${{ secrets.PASSWORD }}
OTPCODE: ${{ secrets.OTPCODE }}
USER_POOL_ID: ${{ secrets.USER_POOL_ID }}
FEDERATED_POOL_ID: ${{ secrets.FEDERATED_POOL_ID }}
- name: Publish code coverage
uses: paambaati/[email protected]
env:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/update-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'poetry'
- name: Install deps
run: pip install -r requirements.txt
run: poetry install
- name: Create md files
run: sphinx-build -M markdown ./docs_source ./docs
- name: Update docs website
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Scribe Labs Limited
Copyright (c) 2025 Scribe Labs Limited

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
30 changes: 1 addition & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This library interacts directly with our authentication provider [AWS Cognito](h
pip install scribeauth
```

This library requires Python >= 3.10 that supports typing.
This library requires Python >= 3.11 that supports typing.

## Methods

Expand Down Expand Up @@ -58,30 +58,6 @@ access = ScribeAuth(client_id)
access.revoke_refresh_token('refresh_token')
```

### 5. Getting federated id

```python
from scribeauth import ScribeAuth
access = ScribeAuth({'client_id': your_client_id, 'user_pool_id': your_user_pool_id, 'identity_pool_id': your_identity_pool_id})
access.get_federated_id('your_id_token')
```

### 6. Getting federated credentials

```python
from scribeauth import ScribeAuth
access = ScribeAuth({'client_id': your_client_id, 'user_pool_id': your_user_pool_id, 'identity_pool_id': your_identity_pool_id})
access.get_federated_credentials('your_federated_id', 'your_id_token')
```

### 7. Getting signature for request

```python
from scribeauth import ScribeAuth
access = ScribeAuth({'client_id': your_client_id, 'user_pool_id': your_user_pool_id, 'identity_pool_id': your_identity_pool_id})
access.get_signature_for_request(request='your_request', credentials='your_federated_credentials')
```

## Flow

- If you never have accessed your Scribe account, it probably still contains the temporary password we generated for you. You can change it directly on the [platform](https://platform.scribelabs.ai) or with the `change_password` method. You won't be able to access anything else until the temporary password has been changed.
Expand All @@ -92,10 +68,6 @@ access.get_signature_for_request(request='your_request', credentials='your_feder

- In case you suspect that your refresh token has been leaked, you can revoke it with `revoke_token`. This will also invalidate any access/id token that has been issued with it. In order to get a new one, you'll need to use your username and password again.

- You can get your federated id by using `get_federated_id` and providing your id token. The federated id will allow you to use `get_federated_credentials` to get an access key id, secret key and session token.

- Every API call to be made to Scribe's API Gateway needs to have a signature. You can get the signature for your request by using `get_signature_for_request`. Provide the request you'll be using and your credentials (use `get_federated_credentials` to get them).

## Command line

You can also use the package as follows for quick access to tokens:
Expand Down
7 changes: 5 additions & 2 deletions docs_source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

import json

project = "Scribe Auth"
copyright = "2023, Scribe Labs Limited"
copyright = "2025, Scribe Labs Limited"
author = "Ailin Venerus"
release = "1.0.2"
with open("../.release-please-manifest.json") as f:
release = json.load(f)["."]

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion docs_source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To use Scribe Auth, first install it using pip:

(.venv) $ pip install scribeauth

This library requires Python >= 3.10 that supports typings.
This library requires Python >= 3.11 that supports typings.


--------------
Expand Down
Loading
Loading