Name | oauth2tools JSON |
Version |
0.9.1
JSON |
| download |
home_page | None |
Summary | A toolset for the most requirements dealing with OAuth2 and OpenID Connect. |
upload_time | 2024-07-04 19:51:53 |
maintainer | Andreas Rühl |
docs_url | None |
author | Andreas Rühl |
requires_python | >=3.7 |
license | MIT |
keywords |
oauth2
oidc
openid connect
tools
helper
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# OAuth2Tools
A toolset for the most requirements dealing with OAuth2 and OpenID Connect.
## Installation
You can download it from [pypi.org](https://pypi.org/project/oauth2tools/) or install it with pip
pip install oauth2tools
## Samples
### Building the URL for the authentication endpoint
from oauth2tools import OAuthTools
tools = OAuthTools(
well_known_url="<url>",
client_id="<cid>",
client_secret="<secret>")
auth_url = tools.authorization_url(redirect_uri="<uri>")
### Using the Browser in a CLI script for authentication
from oauth2tools import OAuth4CLI
o4c = OAuth4CLI(
well_known_url="<url>",
client_id="<cid>",
client_secret="<secret>")
response = o4c.login()
access_token = response.get('access_token')
### Validate an received token
from oauth2tools import jwt_helper
try:
jwt_helper.validate_by_jwks(
token="<jwt>",
jwks_url="<jwks_url>",
claims={"<claim_name>": "expected_value"})
except Exception as e:
...
Raw data
{
"_id": null,
"home_page": null,
"name": "oauth2tools",
"maintainer": "Andreas R\u00fchl",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "OAuth2, OIDC, OpenID Connect, Tools, Helper",
"author": "Andreas R\u00fchl",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/2d/77/23089f9a176c71268ab1cc6843adcfcba1e067d7b12aa434faf811e3d885/oauth2tools-0.9.1.tar.gz",
"platform": null,
"description": "# OAuth2Tools\n\nA toolset for the most requirements dealing with OAuth2 and OpenID Connect.\n\n## Installation\n\nYou can download it from [pypi.org](https://pypi.org/project/oauth2tools/) or install it with pip\n\n pip install oauth2tools\n\n## Samples\n\n### Building the URL for the authentication endpoint\n\n from oauth2tools import OAuthTools\n\n tools = OAuthTools(\n well_known_url=\"<url>\",\n client_id=\"<cid>\",\n client_secret=\"<secret>\")\n auth_url = tools.authorization_url(redirect_uri=\"<uri>\")\n\n### Using the Browser in a CLI script for authentication\n\n from oauth2tools import OAuth4CLI\n\n o4c = OAuth4CLI(\n well_known_url=\"<url>\",\n client_id=\"<cid>\",\n client_secret=\"<secret>\")\n response = o4c.login()\n access_token = response.get('access_token')\n\n### Validate an received token\n\n from oauth2tools import jwt_helper\n\n try:\n jwt_helper.validate_by_jwks(\n token=\"<jwt>\",\n jwks_url=\"<jwks_url>\",\n claims={\"<claim_name>\": \"expected_value\"})\n except Exception as e:\n ...\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A toolset for the most requirements dealing with OAuth2 and OpenID Connect.",
"version": "0.9.1",
"project_urls": {
"Bug Tracker": "https://github.com/aruehl/oauth2tools/issues",
"GitHub": "https://github.com/aruehl/oauth2tools"
},
"split_keywords": [
"oauth2",
" oidc",
" openid connect",
" tools",
" helper"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b3e3a0aef76b2c2b02066c48458ca5c4a29b659314f2f0d45fe6755be2cd12c5",
"md5": "864620d68204209a24f405b68b5d333f",
"sha256": "e89a56ef5262b3e5ef43be379e874a27ff9c02f0fed1f7a1f90359fe2aa93a91"
},
"downloads": -1,
"filename": "oauth2tools-0.9.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "864620d68204209a24f405b68b5d333f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 8893,
"upload_time": "2024-07-04T19:51:52",
"upload_time_iso_8601": "2024-07-04T19:51:52.275181Z",
"url": "https://files.pythonhosted.org/packages/b3/e3/a0aef76b2c2b02066c48458ca5c4a29b659314f2f0d45fe6755be2cd12c5/oauth2tools-0.9.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2d7723089f9a176c71268ab1cc6843adcfcba1e067d7b12aa434faf811e3d885",
"md5": "972f8408a55e5ffa627b481a0afa9153",
"sha256": "a3525675decae544b360b0f5f0254ac16ec8047f67d834a0237e6944013b9763"
},
"downloads": -1,
"filename": "oauth2tools-0.9.1.tar.gz",
"has_sig": false,
"md5_digest": "972f8408a55e5ffa627b481a0afa9153",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 7927,
"upload_time": "2024-07-04T19:51:53",
"upload_time_iso_8601": "2024-07-04T19:51:53.608719Z",
"url": "https://files.pythonhosted.org/packages/2d/77/23089f9a176c71268ab1cc6843adcfcba1e067d7b12aa434faf811e3d885/oauth2tools-0.9.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-04 19:51:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aruehl",
"github_project": "oauth2tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "oauth2tools"
}