Name | msal-bearer JSON |
Version |
1.2.0
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 | 2025-02-21 07:24:29 |
maintainer | None |
docs_url | None |
author | Åsmund Våge Fannemel |
requires_python | <4.0.0,>=3.9.2 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# msal-bearer [](https://github.com/equinor/msal-bearer/actions/workflows/snyk.yml)
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.0,>=3.9.2",
"maintainer_email": null,
"keywords": null,
"author": "\u00c5smund V\u00e5ge Fannemel",
"author_email": "asmf@equinor.com",
"download_url": "https://files.pythonhosted.org/packages/ac/62/4192edc58dc447868faac01b385b7928a5cd7c3500bb9ddd11b89ed9be7b/msal_bearer-1.2.0.tar.gz",
"platform": null,
"description": "# msal-bearer [](https://github.com/equinor/msal-bearer/actions/workflows/snyk.yml)\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.2.0",
"project_urls": {
"Homepage": "https://github.com/Equinor/msal-bearer",
"Repository": "https://github.com/Equinor/msal-bearer"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0763b99e82d20e94ce76f14589371078d16a0c34c779556d02bebfa413ed5b5c",
"md5": "ad634e9b951d1d66002ee50e3821d171",
"sha256": "586a278276c20bb985f386297dff41999baa790581afb3f517363a3a519a0fa5"
},
"downloads": -1,
"filename": "msal_bearer-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ad634e9b951d1d66002ee50e3821d171",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.9.2",
"size": 4828,
"upload_time": "2025-02-21T07:24:27",
"upload_time_iso_8601": "2025-02-21T07:24:27.722371Z",
"url": "https://files.pythonhosted.org/packages/07/63/b99e82d20e94ce76f14589371078d16a0c34c779556d02bebfa413ed5b5c/msal_bearer-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ac624192edc58dc447868faac01b385b7928a5cd7c3500bb9ddd11b89ed9be7b",
"md5": "8e738b04bb4a397e9238fb302a059f20",
"sha256": "70e798e75e5c43471de1809e480b78ad28b17bf7aa268d261296dfa88acb7a50"
},
"downloads": -1,
"filename": "msal_bearer-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "8e738b04bb4a397e9238fb302a059f20",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.9.2",
"size": 4227,
"upload_time": "2025-02-21T07:24:29",
"upload_time_iso_8601": "2025-02-21T07:24:29.401350Z",
"url": "https://files.pythonhosted.org/packages/ac/62/4192edc58dc447868faac01b385b7928a5cd7c3500bb9ddd11b89ed9be7b/msal_bearer-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-21 07:24:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Equinor",
"github_project": "msal-bearer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "msal-bearer"
}