fastapi_keycloak


Namefastapi_keycloak JSON
Version 1.0.10 PyPI version JSON
download
home_pageNone
SummaryKeycloak API Client for integrating authentication and authorization with FastAPI
upload_time2023-05-24 06:10:18
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords keycloak fastapi authentication authorization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastAPI Keycloak Integration

[![Test-Suite](https://github.com/code-specialist/fastapi-keycloak/actions/workflows/testing.yaml/badge.svg)](https://github.com/code-specialist/fastapi-keycloak/actions/workflows/testing.yaml)
[![CodeFactor](https://www.codefactor.io/repository/github/code-specialist/fastapi-keycloak/badge)](https://www.codefactor.io/repository/github/code-specialist/fastapi-keycloak)
[![codecov](https://codecov.io/gh/code-specialist/fastapi-keycloak/branch/master/graph/badge.svg?token=PX6NJBDUJ9)](https://codecov.io/gh/code-specialist/fastapi-keycloak)
![Py3.8](https://img.shields.io/badge/-Python%203.8-brightgreen)
![Py3.9](https://img.shields.io/badge/-Python%203.9-brightgreen)
![Py3.10](https://img.shields.io/badge/-Python%203.10-brightgreen)
[![CodeQL](https://github.com/code-specialist/fastapi-keycloak/actions/workflows/codeql.yml/badge.svg)](https://github.com/code-specialist/fastapi-keycloak/actions/workflows/codeql.yml)

---

## Notice - 📢 LOOKING FOR MAINTAINERS 📢

We created this as an open-source project in order to share our code with other people. Unfortunately we decided to abandon Keycloak in our project due to its unreliability in API compatibility and the general maintenance overhead. Therefore, we are no longer able to frequently update this library. We are searching for someone or a group of people to maintain this repository actively, as we do not have the capacity but think that keycloak still is a highly relevant IDP solution. If you or your team want to take over the responsibility, please mail us at [admin@code-specialist.com](mailto:admin@code-specialist.com)

## Introduction

Welcome to `fastapi-keycloak`. This projects goal is to ease the integration of Keycloak (OpenID Connect) with Python, especially FastAPI. FastAPI is not necessary but is
encouraged due to specific features. Currently, this package supports only the `password` and the `authorization_code`. However, the `get_current_user()` method accepts any JWT
that was signed using Keycloak´s private key.

## Docs

Docs are available at [https://fastapi-keycloak.code-specialist.com/](https://fastapi-keycloak.code-specialist.com/).

## TLDR

FastAPI Keycloak enables you to do the following things without writing a single line of additional code:

- Verify identities and roles of users with Keycloak
- Get a list of available identity providers
- Create/read/delete users
- Create/read/delete roles
- Create/read/delete/assign groups (recursive). Thanks to @fabiothz
- Assign/remove roles from users
- Implement the `password` or the `authorization_code` flow (login/callback/logout)

## Contributions

We would like encourage anyone using this package to contribute to its improvement, if anything isn't working as expected or isn't well enough documented, please open an issue or a
pull request. Please note that for any code contribution tests are required.

### Testing

Tests are stored and executed in `./tests`. To test the package, it is necessary to use the `start_infra.sh` script upfront, to set up Keycloak and Postgres. We do this to avoid
artificial testing conditions that occur by mocking all the keycloak requests. The issue here is that we currently see no way to offer public testing opportunities without
significant security issues, which is why you have to run these tests locally and provide a `test_coverage.xml` file. The test coverage is configured in the `pytest.ini` and will
be created once the tests finished running (locally).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fastapi_keycloak",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Jonas Scholl <jonas@code-specialist.com>, Yannic Schr\u00f6er <yannic@code-specialist.com>",
    "keywords": "Keycloak,FastAPI,Authentication,Authorization",
    "author": null,
    "author_email": "Jonas Scholl <jonas@code-specialist.com>, Yannic Schr\u00f6er <yannic@code-specialist.com>",
    "download_url": "https://files.pythonhosted.org/packages/35/47/032629fb79abcf7a9bc9a4423d0cc8bd9c7dfd6cd0f5389f33ea9ebed329/fastapi_keycloak-1.0.10.tar.gz",
    "platform": null,
    "description": "# FastAPI Keycloak Integration\n\n[![Test-Suite](https://github.com/code-specialist/fastapi-keycloak/actions/workflows/testing.yaml/badge.svg)](https://github.com/code-specialist/fastapi-keycloak/actions/workflows/testing.yaml)\n[![CodeFactor](https://www.codefactor.io/repository/github/code-specialist/fastapi-keycloak/badge)](https://www.codefactor.io/repository/github/code-specialist/fastapi-keycloak)\n[![codecov](https://codecov.io/gh/code-specialist/fastapi-keycloak/branch/master/graph/badge.svg?token=PX6NJBDUJ9)](https://codecov.io/gh/code-specialist/fastapi-keycloak)\n![Py3.8](https://img.shields.io/badge/-Python%203.8-brightgreen)\n![Py3.9](https://img.shields.io/badge/-Python%203.9-brightgreen)\n![Py3.10](https://img.shields.io/badge/-Python%203.10-brightgreen)\n[![CodeQL](https://github.com/code-specialist/fastapi-keycloak/actions/workflows/codeql.yml/badge.svg)](https://github.com/code-specialist/fastapi-keycloak/actions/workflows/codeql.yml)\n\n---\n\n## Notice - \ud83d\udce2 LOOKING FOR MAINTAINERS \ud83d\udce2\n\nWe created this as an open-source project in order to share our code with other people. Unfortunately we decided to abandon Keycloak in our project due to its unreliability in API compatibility and the general maintenance overhead. Therefore, we are no longer able to frequently update this library. We are searching for someone or a group of people to maintain this repository actively, as we do not have the capacity but think that keycloak still is a highly relevant IDP solution. If you or your team want to take over the responsibility, please mail us at [admin@code-specialist.com](mailto:admin@code-specialist.com)\n\n## Introduction\n\nWelcome to `fastapi-keycloak`. This projects goal is to ease the integration of Keycloak (OpenID Connect) with Python, especially FastAPI. FastAPI is not necessary but is\nencouraged due to specific features. Currently, this package supports only the `password` and the `authorization_code`. However, the `get_current_user()` method accepts any JWT\nthat was signed using Keycloak\u00b4s private key.\n\n## Docs\n\nDocs are available at [https://fastapi-keycloak.code-specialist.com/](https://fastapi-keycloak.code-specialist.com/).\n\n## TLDR\n\nFastAPI Keycloak enables you to do the following things without writing a single line of additional code:\n\n- Verify identities and roles of users with Keycloak\n- Get a list of available identity providers\n- Create/read/delete users\n- Create/read/delete roles\n- Create/read/delete/assign groups (recursive). Thanks to @fabiothz\n- Assign/remove roles from users\n- Implement the `password` or the `authorization_code` flow (login/callback/logout)\n\n## Contributions\n\nWe would like encourage anyone using this package to contribute to its improvement, if anything isn't working as expected or isn't well enough documented, please open an issue or a\npull request. Please note that for any code contribution tests are required.\n\n### Testing\n\nTests are stored and executed in `./tests`. To test the package, it is necessary to use the `start_infra.sh` script upfront, to set up Keycloak and Postgres. We do this to avoid\nartificial testing conditions that occur by mocking all the keycloak requests. The issue here is that we currently see no way to offer public testing opportunities without\nsignificant security issues, which is why you have to run these tests locally and provide a `test_coverage.xml` file. The test coverage is configured in the `pytest.ini` and will\nbe created once the tests finished running (locally).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Keycloak API Client for integrating authentication and authorization with FastAPI",
    "version": "1.0.10",
    "project_urls": {
        "Documentation": "https://fastapi-keycloak.code-specialist.com/"
    },
    "split_keywords": [
        "keycloak",
        "fastapi",
        "authentication",
        "authorization"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "41b8d7d6e0a04e581a408ec4407763d99df81c3dc91ddd26054c2e0f77fbd9e4",
                "md5": "cc0dd65b095ddc0fc1f30936f82bcf72",
                "sha256": "4d9f189414db1bb029fbb0688b32de854da3e17edd0875c549ceaabef4e3e212"
            },
            "downloads": -1,
            "filename": "fastapi_keycloak-1.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cc0dd65b095ddc0fc1f30936f82bcf72",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19511,
            "upload_time": "2023-05-24T06:10:16",
            "upload_time_iso_8601": "2023-05-24T06:10:16.209143Z",
            "url": "https://files.pythonhosted.org/packages/41/b8/d7d6e0a04e581a408ec4407763d99df81c3dc91ddd26054c2e0f77fbd9e4/fastapi_keycloak-1.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3547032629fb79abcf7a9bc9a4423d0cc8bd9c7dfd6cd0f5389f33ea9ebed329",
                "md5": "5bfb1b7d26e3cd2465874f817f380d6c",
                "sha256": "780e3339d19fde13aa40d29bc3acba2b505ae51263b04f5eea6fe0c4855df6b5"
            },
            "downloads": -1,
            "filename": "fastapi_keycloak-1.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "5bfb1b7d26e3cd2465874f817f380d6c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 67404,
            "upload_time": "2023-05-24T06:10:18",
            "upload_time_iso_8601": "2023-05-24T06:10:18.497366Z",
            "url": "https://files.pythonhosted.org/packages/35/47/032629fb79abcf7a9bc9a4423d0cc8bd9c7dfd6cd0f5389f33ea9ebed329/fastapi_keycloak-1.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-24 06:10:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fastapi_keycloak"
}
        
Elapsed time: 0.07786s