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-sso
torequirements.txt
ibm-sso==0.3.0
For versions lower than
0.3.0
, thetoken
is returned directly after successful authentication.Starting from version
0.3.0
, you need to create your ownnonce
on the client side and then pass thatnonce
along with theredirect_uri
to the server side.code
andstate
are returned after successful authentication. You need to use thecode
,state
,nonce
andredirect_uri
to obtain token information. -
Install
ibm-sso
fromrequirements.txt
filepipenv install -r requirements.txt
-
Set environment variables
Refer to the .env.template in the sample directory.
-
Import
ibm-sso
in startup fileRefer to the app.py in the sample directory.
-
Protect your API
If your API requires authentication to access, you can refer to sample.py
Sample
There is a full sample in the sample
directory that can be run directly. You can start from the sample 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.org
pipenv 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
/token
and/introspect
api. -
Modify the environment from
W3ID_ENDPOINT_DISCOVERY
toW3ID_SERVER_METADATA_URL
-
Use AsyncOAuth2Client to replace OAuth2Session.
Project details
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
File details
Details for the file ibm_sso-0.3.0.tar.gz
.
File metadata
- Download URL: ibm_sso-0.3.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9414dc5c979204f1e979ecc30ad22dacaa80fc4410336a6ce7e1785e8c0ecd34 |
|
MD5 | 5ef494f19a8a5bf1f97d6efa35c871ca |
|
BLAKE2b-256 | 88b7215ff216d32143dd3d63065133957b2b3e384ea55a08ad16abde70defc91 |
File details
Details for the file ibm_sso-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: ibm_sso-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.7 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 | 652afeffb21ea05d2350687b41010ca335950c0f42e3f6641f6f5d95673d4e71 |
|
MD5 | e735c61178ae1a67eaa482d0133fc86b |
|
BLAKE2b-256 | f49b05d0277027b9847f52be61744f6d21784185950cab3a9df9d347adf4518c |