IBM SSO Self-Service Provisioner
Project description
ibm-sso
When using SSO Self-Service Provisioner for single sign-on, ibm-sso can make your work easier.
Currently only supports fastapi applications.
Getting Started
pip install ibm-sso
Usage
-
Add
ibm-ssotorequirements.txtibm-sso==0.3.2
For versions lower than
0.3.0, thetokenis returned directly after successful authentication.Starting from version
0.3.0, you need to create your ownnonceon the client side and then pass thatnoncealong with theredirect_urito the server side.codeandstateare returned after successful authentication. You need to use thecode,state,nonceandredirect_urito obtain token information. -
Set environment variables
Refer to the .env.template in the examples directory.
-
Import
ibm-ssoin startup fileRefer to the main.py in the examples directory.
-
Protect your API
If your API requires authentication to access, you can refer to example.py
Examples
There is a full example in the examples directory that can be run directly. You can start from the example to learn how to use ibm-sso.
Deploy project(memo for developer)
-
Deploy project
# https://test.pypi.org/ expect interactive_deploy_test.expect # https://pypi.org/ # expect interactive_deploy.expect
-
Use
test.pypi.orgpip install -i https://test.pypi.org/simple/ ibm-sso
-
How to mark a version as yanked
twine yank <package_name> --version <version> --reason "Reason this release was yanked: Yanked due to <reason>"
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.0.1] - 2023-11-28
- First commit
[0.0.2] - 2023-12-06
- Add avatar to UserInfoVO
[0.0.3] - 2023-12-06
Added
- Add avatar to UserInfoVO when the user authenticates.
[0.0.4] - 2024-02-21
Fixed
- Fixed mismatching_state and invalid_grant error.
[0.0.5] - 2024-07-22
Fixed
- Fixed pydantic.errors.PydanticUserError: Cannot create a Pydantic dataclass from UserInfoVO as it is already a Pydantic model.
[0.3.0] - 2024-10-24
Updated
-
Replace token with code and state
-
Add
/tokenand/introspectapi. -
Modify the environment from
W3ID_ENDPOINT_DISCOVERYtoW3ID_SERVER_METADATA_URL -
Use AsyncOAuth2Client to replace OAuth2Session.
[0.3.1] - 2025-05-28
Added
- Add
get_current_user_for_middlewarefor FastAPI middleware.
[0.3.2] - 2025-06-23
Updated
- Update the W3ID avatar prefix. You can also set it using the
W3ID_AVATAR_PREFIXenvironment variable.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ibm_sso-0.3.2.tar.gz.
File metadata
- Download URL: ibm_sso-0.3.2.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c916f7a27fc33fc6b15c287f8e6ea5a1a177ec2190766f22372738aaa8e5524
|
|
| MD5 |
8af61a67b39cffc31b956f236662a924
|
|
| BLAKE2b-256 |
cda8228fe86082f155acfbcaff96168ab113a5ace543cef1be4a51adbf2634bf
|
File details
Details for the file ibm_sso-0.3.2-py3-none-any.whl.
File metadata
- Download URL: ibm_sso-0.3.2-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85879a7d2b4f72cc3d88b5724b3a029fced4fa0e52319c083365f030e28f3a8a
|
|
| MD5 |
9bdfcd4d72a721aaea6b4cd54ed62e81
|
|
| BLAKE2b-256 |
a36011cea9cf42970d923118d142939b00f1fca79f88caa3b77621886f5c3270
|