ibm-sso


Nameibm-sso JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/xiaobitipao/ibm-sso
SummaryIBM SSO Self-Service Provisioner
upload_time2023-12-06 05:39:00
maintainer
docs_urlNone
authorxiaobitipao
requires_python>=3.10
licenseBSD-3-Clause
keywords sso fastapi oidc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            - [ibm-sso](#ibm-sso)
  - [Getting Started](#getting-started)
  - [Usage](#usage)
  - [Sample](#sample)
  - [Deploy project(memo for developer)](#deploy-projectmemo-for-developer)

# 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

```bash
pip install ibm-sso
```

## Usage

1. Add `ibm-sso` to `requirements.txt` file

    ```bash
    ibm-sso==0.0.1
    ```

2. Install `ibm-sso` from `requirements.txt` file

    ```bash
    pipenv install -r requirements.txt
    ```

3. Set environment variables

    Refer to the sample directory.

4. Import `ibm-sso` in startup file

    ```python
    from 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'])
    ```

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

```bash
# 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](https://keepachangelog.com/en/1.0.0/), and this
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xiaobitipao/ibm-sso",
    "name": "ibm-sso",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "sso,fastapi,oidc",
    "author": "xiaobitipao",
    "author_email": "xiaobitipao@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3d/24/6fc2362bb000e6b9fb9eee4398cbd35bf62d47b519752b59d5e6bb742f3d/ibm_sso-0.0.3.tar.gz",
    "platform": null,
    "description": "- [ibm-sso](#ibm-sso)\n  - [Getting Started](#getting-started)\n  - [Usage](#usage)\n  - [Sample](#sample)\n  - [Deploy project(memo for developer)](#deploy-projectmemo-for-developer)\n\n# ibm-sso\n\nWhen using `SSO Self-Service Provisioner` for single sign-on, `ibm-sso` can make your work easier.\n\n> Currently only supports fastapi applications.\n\n## Getting Started\n\n```bash\npip install ibm-sso\n```\n\n## Usage\n\n1. Add `ibm-sso` to `requirements.txt` file\n\n    ```bash\n    ibm-sso==0.0.1\n    ```\n\n2. Install `ibm-sso` from `requirements.txt` file\n\n    ```bash\n    pipenv install -r requirements.txt\n    ```\n\n3. Set environment variables\n\n    Refer to the sample directory.\n\n4. Import `ibm-sso` in startup file\n\n    ```python\n    from starlette.middleware.sessions import SessionMiddleware\n\n    app = FastAPI()\n\n    @app.exception_handler(OAuthError)\n    async def oauth_error_exception_handler(request, exc: OAuthError):\n        return JSONResponse(content={'detail': exc.error}, status_code=status.HTTP_401_UNAUTHORIZED)\n\n    app.add_middleware(SessionMiddleware, secret_key='Change Me to Random Secret!')\n\n    app.include_router(authorize_router, prefix='/oauth2', tags=['Authorize API'])\n    ```\n\n5. Now, your application has added SSO authentication functionality.\n\n## Sample\n\nThere 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.\n\n## Deploy project(memo for developer)\n\n```bash\n# https://test.pypi.org/\nexpect interactive_deploy_test.expect\n\n# https://pypi.org/\n# expect interactive_deploy.expect\n```\n\n# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this\nproject adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.0.1] - 2023-11-28\n\n-   First commit\n\n## [0.0.2] - 2023-12-06\n\n-   Add avatar to UserInfoVO\n\n## [0.0.3] - 2023-12-06\n\n**Added**\n\n-   Add avatar to UserInfoVO when the user authenticates.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "IBM SSO Self-Service Provisioner",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/xiaobitipao/ibm-sso"
    },
    "split_keywords": [
        "sso",
        "fastapi",
        "oidc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e74eb33168a2e9b1fbe3278a698e01e98a2d7a4cd31b36a35521b9f02b396b3",
                "md5": "7da9b5e4737ebf7ee7cf51d1aaa8f021",
                "sha256": "ad1cab65c63d4c61afed054d58b40f6ff17071d47c773af40e18da08bd66aa0e"
            },
            "downloads": -1,
            "filename": "ibm_sso-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7da9b5e4737ebf7ee7cf51d1aaa8f021",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 8668,
            "upload_time": "2023-12-06T05:38:59",
            "upload_time_iso_8601": "2023-12-06T05:38:59.559043Z",
            "url": "https://files.pythonhosted.org/packages/7e/74/eb33168a2e9b1fbe3278a698e01e98a2d7a4cd31b36a35521b9f02b396b3/ibm_sso-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d246fc2362bb000e6b9fb9eee4398cbd35bf62d47b519752b59d5e6bb742f3d",
                "md5": "97fed15f8626a96830eefff803b213ac",
                "sha256": "d2fd84094ec8812a08a898184e61a389b277fa20ba699ceae32af32bc39f7bdf"
            },
            "downloads": -1,
            "filename": "ibm_sso-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "97fed15f8626a96830eefff803b213ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 8553,
            "upload_time": "2023-12-06T05:39:00",
            "upload_time_iso_8601": "2023-12-06T05:39:00.940042Z",
            "url": "https://files.pythonhosted.org/packages/3d/24/6fc2362bb000e6b9fb9eee4398cbd35bf62d47b519752b59d5e6bb742f3d/ibm_sso-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-06 05:39:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xiaobitipao",
    "github_project": "ibm-sso",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "ibm-sso"
}
        
Elapsed time: 0.16494s