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
fileibm-sso==0.0.1
-
Install
ibm-sso
fromrequirements.txt
filepipenv install -r requirements.txt
-
Set environment variables
Refer to the sample directory.
-
Import
ibm-sso
in startup filefrom starlette.middleware.sessions import SessionMiddleware app = FastAPI() @app.exception_handler(OAuthError) async def oauth_error_exception_handler(request, exc: OAuthError): return JSONResponse(content={'detail': exc.error}, status_code=status.HTTP_401_UNAUTHORIZED) app.add_middleware(SessionMiddleware, secret_key='Change Me to Random Secret!') app.include_router(authorize_router, prefix='/oauth2', tags=['Authorize API'])
-
Now, your application has added SSO authentication functionality.
Sample
There is a 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)
# https://test.pypi.org/
expect interactive_deploy_test.expect
# https://pypi.org/
# expect interactive_deploy.expect
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.