Name | msal-bearer JSON |
Version |
1.1.2
JSON |
| download |
home_page | https://github.com/Equinor/msal-bearer |
Summary | Python package to get auth token interactively for a public client application using msal and msal-extension for caching. |
upload_time | 2024-09-09 07:17:18 |
maintainer | None |
docs_url | None |
author | Åsmund Våge Fannemel |
requires_python | <4.0,>=3.8 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# msal-bearer
Python package to get authorization token interactively for a msal public client application supporting local cache and refreshing the token.
## Usage
````
from msal_bearer.BearerAuth import BearerAuth
tenantID = "YOUR_TENANT_ID"
client_id = "YOUR_CLIENT_ID"
scope = ["YOUR_SCOPE"]
auth = BearerAuth.get_auth(
tenantID=tenantID,
clientID=client_id,
scopes=scope
)
# Supports requests
response = requests.get("https://www.example.com/", auth=auth)
# and httpx
client = httpx.Client()
response = client.get("https://www.example.com/", auth=auth)
````
## Installing
Clone and install using poetry or install from pypi using pip.
````
pip install msal_bearer
````
## Alternatives
Other similar packages include https://pypi.org/project/msal-requests-auth/ (for confidential client applications) and https://pypi.org/project/msal-interactive-token-acquirer/ (no caching implemented).
Raw data
{
"_id": null,
"home_page": "https://github.com/Equinor/msal-bearer",
"name": "msal-bearer",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "\u00c5smund V\u00e5ge Fannemel",
"author_email": "asmf@equinor.com",
"download_url": "https://files.pythonhosted.org/packages/7e/f1/9158aad001704feb70e13cb4d93ea68e180e05352410fb6e40e591086fab/msal_bearer-1.1.2.tar.gz",
"platform": null,
"description": "# msal-bearer\nPython package to get authorization token interactively for a msal public client application supporting local cache and refreshing the token.\n\n## Usage\n\n\n````\nfrom msal_bearer.BearerAuth import BearerAuth\n\ntenantID = \"YOUR_TENANT_ID\"\nclient_id = \"YOUR_CLIENT_ID\"\nscope = [\"YOUR_SCOPE\"]\n\nauth = BearerAuth.get_auth(\n tenantID=tenantID,\n clientID=client_id,\n scopes=scope\n)\n\n# Supports requests\nresponse = requests.get(\"https://www.example.com/\", auth=auth)\n\n# and httpx\nclient = httpx.Client()\nresponse = client.get(\"https://www.example.com/\", auth=auth)\n\n````\n\n\n## Installing\nClone and install using poetry or install from pypi using pip. \n\n````\npip install msal_bearer\n````\n\n\n## Alternatives\nOther similar packages include https://pypi.org/project/msal-requests-auth/ (for confidential client applications) and https://pypi.org/project/msal-interactive-token-acquirer/ (no caching implemented).\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python package to get auth token interactively for a public client application using msal and msal-extension for caching.",
"version": "1.1.2",
"project_urls": {
"Homepage": "https://github.com/Equinor/msal-bearer",
"Repository": "https://github.com/Equinor/msal-bearer"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b0e8157335de580bd5d7c721c1ff76708da3c570e177ca26f9c181fd4c56a6fe",
"md5": "39a77966e013c45c834a57014c7f4054",
"sha256": "5c2fe284def33e80ef7c74b5fb3dcbd1df80b2fa3410a46a71107dd6b143d516"
},
"downloads": -1,
"filename": "msal_bearer-1.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "39a77966e013c45c834a57014c7f4054",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 4604,
"upload_time": "2024-09-09T07:17:16",
"upload_time_iso_8601": "2024-09-09T07:17:16.636778Z",
"url": "https://files.pythonhosted.org/packages/b0/e8/157335de580bd5d7c721c1ff76708da3c570e177ca26f9c181fd4c56a6fe/msal_bearer-1.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7ef19158aad001704feb70e13cb4d93ea68e180e05352410fb6e40e591086fab",
"md5": "cc0e55fed0c246f4f9762f53c0b597d1",
"sha256": "e4f238804ae556d6a0938b3b7d1f2eed9d796e6d60472a10be8a2ffda26a7bfb"
},
"downloads": -1,
"filename": "msal_bearer-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "cc0e55fed0c246f4f9762f53c0b597d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 4155,
"upload_time": "2024-09-09T07:17:18",
"upload_time_iso_8601": "2024-09-09T07:17:18.205389Z",
"url": "https://files.pythonhosted.org/packages/7e/f1/9158aad001704feb70e13cb4d93ea68e180e05352410fb6e40e591086fab/msal_bearer-1.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-09 07:17:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Equinor",
"github_project": "msal-bearer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "msal-bearer"
}