Skip to main content

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

  1. Add ibm-sso to requirements.txt

    ibm-sso==0.1.1
    

    For versions above 0.1.0, code and state are returned after successful authentication. You need to use the code and state to obtain token information.

    For versions lower than 0.1.0, the token is returned directly after successful authentication. Since the token is returned as the query param of the callback, there are security risks. Versions higher than 0.1.0 are recommended.

  2. Install ibm-sso from requirements.txt file

    pipenv install -r requirements.txt
    
  3. Set environment variables

    Refer to the .env.template in the sample directory.

  4. Import ibm-sso in startup file

    Refer to the app.py in the sample directory.

  5. 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)

  1. Deploy project

    # https://test.pypi.org/
    expect interactive_deploy_test.expect
    
    # https://pypi.org/
    # expect interactive_deploy.expect
    
  2. Use test.pypi.org

    pipenv install -i https://test.pypi.org/simple/ ibm-sso
    

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.1.0] - 2024-08-06

Updated

  • Replace token with code and state
  • Add /token and /introspect api.

[0.1.1] - 2024-08-08

Updated

  • Modify the environment from W3ID_ENDPOINT_DISCOVERY to W3ID_SERVER_METADATA_URL

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

ibm_sso-0.1.1.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

ibm_sso-0.1.1-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page