identity


Nameidentity JSON
Version 0.7.0 PyPI version JSON
download
home_pagehttps://github.com/rayluo/identity
SummaryThis is an authentication/authorization library, currently optimized for web apps. It provides some higher level APIs built on top of Microsoft's MSAL Python.
upload_time2024-03-30 01:38:54
maintainerNone
docs_urlNone
authorRay Luo
requires_python>=3.8
licenseMIT
keywords identity auth authentication authorization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Identity library

<!-- The following summary is reused in, and needs to be in-sync with, the docs/index.rst -->
This Identity library is an authentication/authorization library that:

* Suitable for apps that are targeting end users on
  [Microsoft identity platform, a.k.a. Microsoft Entra ID](https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-overview)
  (which includes Work or school accounts provisioned through Azure AD,
  and Personal Microsoft accounts such as Skype, Xbox, Outlook.com).
* Currently designed for web apps,
  regardless of which Python web framework you are using.
* Provides a set of high level API that is built on top of, and easier to be used than
  [Microsoft's MSAL Python library](https://github.com/AzureAD/microsoft-authentication-library-for-python).
* Written in Python, for Python apps.

> DISCLAIMER: The code in this repo is not officially supported by Microsoft and is not intended for production use.
> The intention of this repo is to unblock customers who would like to use a higher level API,
> before such an API has been migrated to an Microsoft library with official support. Migration of this API to official support is not guaranteed and is not currently on the MSAL roadmap.
> Please ensure to fully test any code used from this repository to ensure it works in your environment.

## Scenarios supported

<table border=1>
  <tr>
    <th></th>
    <th>Microsoft Entra ID</th>
    <th>Microsoft Entra External ID</th>
    <th>Microsoft Entra External ID with Custom Domain</th>
    <th>Azure AD B2C</th>
  </tr>

  <tr>
    <th>App Registration</th>
    <td><!-- See https://github.com/github/cmark-gfm/issues/12 -->

Following only the step 1, 2 and 3  of this
[Quickstart: Add sign-in with Microsoft to a Python web app](https://learn.microsoft.com/entra/identity-platform/quickstart-web-app-python-sign-in?tabs=windows)

</td>
    <td>

Follow only the page 1 of this [Tutorial: Prepare your customer tenant ...](https://learn.microsoft.com/entra/external-id/customers/tutorial-web-app-python-flask-prepare-tenant)

</td>
    <td>

Coming soon.

</td>
    <td>

Following only the step 1 and 2 (including 2.1 and 2.2) of this
[Configure authentication in a sample Python web app by using Azure AD B2C](https://learn.microsoft.com/azure/active-directory-b2c/configure-authentication-sample-python-web-app?tabs=linux)

</td>
  </tr>

  <tr>
    <th>Web App Sign In & Sign Out</th>
    <td colspan=4>

By using this library, it will automatically renew signed-in session when the ID token expires.

* [Sample written in ![Django](https://raw.githubusercontent.com/rayluo/identity/dev/docs/django.webp)](https://github.com/Azure-Samples/ms-identity-python-webapp-django)
* [Sample written in ![Flask](https://raw.githubusercontent.com/rayluo/identity/dev/docs/flask.webp)](https://github.com/Azure-Samples/ms-identity-python-webapp)
* Need support for more web frameworks?
  [Upvote existing feature request or create a new one](https://github.com/rayluo/identity/issues)

</td>
  </tr>

  <tr>
    <th>Web App Calls a web API</th>
    <td colspan=4>

This library supports:

+ Incremental consent. If the user needs to consent to more permissions,
  the library will automatically redirect the user to the consent page.
+ Automatically cache the access token and renew it when needed

They are demonstrated by the same samples above.

</td>
  </tr>

  <tr>
    <th>Web API Calls another web API (On-behalf-of)</th>
    <td colspan=4>

In roadmap.

</td>
  </tr>

  <tr>
    <th>How to build the samples above from scratch</th>
    <td colspan=4>

Read our [docs here](https://identity-library.readthedocs.io/en/latest/)

</td>
  </tr>

  <tr>
    <th>Other scenarios</th>
    <td colspan=4>

[Upvote existing feature request or create a new one](https://github.com/rayluo/identity/issues)
<!-- FastAPI, Streamlit, ... -->

</td>
  </tr>

</table>


## Installation

This package is [available on PyPI](https://pypi.org/project/identity/).
You can install it by `pip install identity`.

## Versions

This library follows [Semantic Versioning](http://semver.org/).
Your project should declare `identity` dependency with proper lower and upper bound.

You can find the changes for each version under
[Releases](https://github.com/rayluo/identity/releases).


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rayluo/identity",
    "name": "identity",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "identity, auth, authentication, authorization",
    "author": "Ray Luo",
    "author_email": "rayluo.mba@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/48/fa/6c58e1a67f75ea8b19cf3f5b157fd99c777ae7b4c67508c1e3701708ac1e/identity-0.7.0.tar.gz",
    "platform": null,
    "description": "# Identity library\n\n<!-- The following summary is reused in, and needs to be in-sync with, the docs/index.rst -->\nThis Identity library is an authentication/authorization library that:\n\n* Suitable for apps that are targeting end users on\n  [Microsoft identity platform, a.k.a. Microsoft Entra ID](https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-overview)\n  (which includes Work or school accounts provisioned through Azure AD,\n  and Personal Microsoft accounts such as Skype, Xbox, Outlook.com).\n* Currently designed for web apps,\n  regardless of which Python web framework you are using.\n* Provides a set of high level API that is built on top of, and easier to be used than\n  [Microsoft's MSAL Python library](https://github.com/AzureAD/microsoft-authentication-library-for-python).\n* Written in Python, for Python apps.\n\n> DISCLAIMER: The code in this repo is not officially supported by Microsoft and is not intended for production use.\n> The intention of this repo is to unblock customers who would like to use a higher level API,\n> before such an API has been migrated to an Microsoft library with official support. Migration of this API to official support is not guaranteed and is not currently on the MSAL roadmap.\n> Please ensure to fully test any code used from this repository to ensure it works in your environment.\n\n## Scenarios supported\n\n<table border=1>\n  <tr>\n    <th></th>\n    <th>Microsoft Entra ID</th>\n    <th>Microsoft Entra External ID</th>\n    <th>Microsoft Entra External ID with Custom Domain</th>\n    <th>Azure AD B2C</th>\n  </tr>\n\n  <tr>\n    <th>App Registration</th>\n    <td><!-- See https://github.com/github/cmark-gfm/issues/12 -->\n\nFollowing only the step 1, 2 and 3  of this\n[Quickstart: Add sign-in with Microsoft to a Python web app](https://learn.microsoft.com/entra/identity-platform/quickstart-web-app-python-sign-in?tabs=windows)\n\n</td>\n    <td>\n\nFollow only the page 1 of this [Tutorial: Prepare your customer tenant ...](https://learn.microsoft.com/entra/external-id/customers/tutorial-web-app-python-flask-prepare-tenant)\n\n</td>\n    <td>\n\nComing soon.\n\n</td>\n    <td>\n\nFollowing only the step 1 and 2 (including 2.1 and 2.2) of this\n[Configure authentication in a sample Python web app by using Azure AD B2C](https://learn.microsoft.com/azure/active-directory-b2c/configure-authentication-sample-python-web-app?tabs=linux)\n\n</td>\n  </tr>\n\n  <tr>\n    <th>Web App Sign In & Sign Out</th>\n    <td colspan=4>\n\nBy using this library, it will automatically renew signed-in session when the ID token expires.\n\n* [Sample written in ![Django](https://raw.githubusercontent.com/rayluo/identity/dev/docs/django.webp)](https://github.com/Azure-Samples/ms-identity-python-webapp-django)\n* [Sample written in ![Flask](https://raw.githubusercontent.com/rayluo/identity/dev/docs/flask.webp)](https://github.com/Azure-Samples/ms-identity-python-webapp)\n* Need support for more web frameworks?\n  [Upvote existing feature request or create a new one](https://github.com/rayluo/identity/issues)\n\n</td>\n  </tr>\n\n  <tr>\n    <th>Web App Calls a web API</th>\n    <td colspan=4>\n\nThis library supports:\n\n+ Incremental consent. If the user needs to consent to more permissions,\n  the library will automatically redirect the user to the consent page.\n+ Automatically cache the access token and renew it when needed\n\nThey are demonstrated by the same samples above.\n\n</td>\n  </tr>\n\n  <tr>\n    <th>Web API Calls another web API (On-behalf-of)</th>\n    <td colspan=4>\n\nIn roadmap.\n\n</td>\n  </tr>\n\n  <tr>\n    <th>How to build the samples above from scratch</th>\n    <td colspan=4>\n\nRead our [docs here](https://identity-library.readthedocs.io/en/latest/)\n\n</td>\n  </tr>\n\n  <tr>\n    <th>Other scenarios</th>\n    <td colspan=4>\n\n[Upvote existing feature request or create a new one](https://github.com/rayluo/identity/issues)\n<!-- FastAPI, Streamlit, ... -->\n\n</td>\n  </tr>\n\n</table>\n\n\n## Installation\n\nThis package is [available on PyPI](https://pypi.org/project/identity/).\nYou can install it by `pip install identity`.\n\n## Versions\n\nThis library follows [Semantic Versioning](http://semver.org/).\nYour project should declare `identity` dependency with proper lower and upper bound.\n\nYou can find the changes for each version under\n[Releases](https://github.com/rayluo/identity/releases).\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This is an authentication/authorization library, currently optimized for web apps. It provides some higher level APIs built on top of Microsoft's MSAL Python.",
    "version": "0.7.0",
    "project_urls": {
        "Changelog": "https://github.com/rayluo/identity/releases",
        "Documentation": "https://identity-library.readthedocs.io/",
        "Homepage": "https://github.com/rayluo/identity"
    },
    "split_keywords": [
        "identity",
        " auth",
        " authentication",
        " authorization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d6253aa1c9e75f5e00ba04af66e628ebfc1a18cfdb7df5546847079d420106d",
                "md5": "9e0ec2f204777adc25712f7b7bdbeac4",
                "sha256": "66bd38f32a4077873bc619582a323e1afdb1a4a3dd4e5e66aa57aba8d94d1b78"
            },
            "downloads": -1,
            "filename": "identity-0.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9e0ec2f204777adc25712f7b7bdbeac4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19857,
            "upload_time": "2024-03-30T01:38:53",
            "upload_time_iso_8601": "2024-03-30T01:38:53.153314Z",
            "url": "https://files.pythonhosted.org/packages/5d/62/53aa1c9e75f5e00ba04af66e628ebfc1a18cfdb7df5546847079d420106d/identity-0.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48fa6c58e1a67f75ea8b19cf3f5b157fd99c777ae7b4c67508c1e3701708ac1e",
                "md5": "c66533b40dddc265708e4401c59f4c20",
                "sha256": "804eb9e56ad89317873db2cb9e244c8103278043a887f17594cfceec882c78ef"
            },
            "downloads": -1,
            "filename": "identity-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c66533b40dddc265708e4401c59f4c20",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 18971,
            "upload_time": "2024-03-30T01:38:54",
            "upload_time_iso_8601": "2024-03-30T01:38:54.732244Z",
            "url": "https://files.pythonhosted.org/packages/48/fa/6c58e1a67f75ea8b19cf3f5b157fd99c777ae7b4c67508c1e3701708ac1e/identity-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-30 01:38:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rayluo",
    "github_project": "identity",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "identity"
}
        
Elapsed time: 0.23499s