Name | cassyy JSON |
Version |
0.0.8
JSON |
| download |
home_page | None |
Summary | Simple Apereo Central Authentication Service (CAS) client |
upload_time | 2023-08-25 20:55:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
authentication
sso
cas
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# cassyy
A simple Apereo Central Authentication Service (CAS) client that provides basic
support for validating service tickets using CAS Protocols 2/3. It uses the
Python standard library `urllib.request` module and has no external
dependencies.
# Usage
Below provides just an example of how it might be used in a web
application. The example is generic and does not represent any specific web
framework. It is up to the application to decide what `service_url` it will
use with the `build_login_url` method. It is common to use the current request
url or a fixed url that CAS will redirect the user to after the login is
successful along with a `ticket` that can be validated to retrieve information
about the user.
```python
import cassyy
cas_client = cassyy.CASClient.from_base_url('https://cas.example.org')
def login_route(request, response):
redirect_url = ...
target_url = cas_client.build_login_url(redirect_url)
response.redirect(target_url)
# This could be a route or some authentication middleware that intercepts
# unauthenticated requests and redirects to CAS and/or validates a CAS ticket
# if one is included in the request.
def validate_route(request, response):
ticket = ... # pull from request
service_url = ...
cas_user = cas_client.validate(service_url, ticket)
request.session['user'] = cas_user.asdict()
def logout_route(request, response):
# where to have CAS redirect back to the app after the CAS logout occurs,
# or None to use the CAS logout page
service_url = ...
target_url = cas_client.build_logout_url(service_url)
response.redirect(target_url)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "cassyy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Authentication,SSO,CAS",
"author": null,
"author_email": "John Wagenleitner <johnwa@mail.fresnostate.edu>",
"download_url": "https://files.pythonhosted.org/packages/7a/67/9e383306833ee333f04fd96dfff46f31e08fd999826facc6d8dfed4b37fe/cassyy-0.0.8.tar.gz",
"platform": null,
"description": "# cassyy\n\nA simple Apereo Central Authentication Service (CAS) client that provides basic\nsupport for validating service tickets using CAS Protocols 2/3. It uses the\nPython standard library `urllib.request` module and has no external\ndependencies.\n\n# Usage\n\nBelow provides just an example of how it might be used in a web\napplication. The example is generic and does not represent any specific web\nframework. It is up to the application to decide what `service_url` it will\nuse with the `build_login_url` method. It is common to use the current request\nurl or a fixed url that CAS will redirect the user to after the login is\nsuccessful along with a `ticket` that can be validated to retrieve information\nabout the user.\n\n```python\nimport cassyy\n\ncas_client = cassyy.CASClient.from_base_url('https://cas.example.org')\n\ndef login_route(request, response):\n redirect_url = ...\n target_url = cas_client.build_login_url(redirect_url)\n response.redirect(target_url)\n\n# This could be a route or some authentication middleware that intercepts\n# unauthenticated requests and redirects to CAS and/or validates a CAS ticket\n# if one is included in the request.\ndef validate_route(request, response):\n ticket = ... # pull from request\n service_url = ...\n cas_user = cas_client.validate(service_url, ticket)\n request.session['user'] = cas_user.asdict()\n\ndef logout_route(request, response):\n # where to have CAS redirect back to the app after the CAS logout occurs,\n # or None to use the CAS logout page\n service_url = ...\n target_url = cas_client.build_logout_url(service_url)\n response.redirect(target_url)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Simple Apereo Central Authentication Service (CAS) client",
"version": "0.0.8",
"project_urls": {
"Home": "https://github.com/jowage58/cassyy",
"Source": "https://github.com/jowage58/cassyy"
},
"split_keywords": [
"authentication",
"sso",
"cas"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "999076942918f9d1f5ac35dc7d2c94e485b010b35a24cabab8ecca1dc94a8a35",
"md5": "a55e9d443562dd314fc113b790d65496",
"sha256": "2b8757ded45853e9390936e8da302cda4a95956b04f87b33ac060abe296c568d"
},
"downloads": -1,
"filename": "cassyy-0.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a55e9d443562dd314fc113b790d65496",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8410,
"upload_time": "2023-08-25T20:55:06",
"upload_time_iso_8601": "2023-08-25T20:55:06.101815Z",
"url": "https://files.pythonhosted.org/packages/99/90/76942918f9d1f5ac35dc7d2c94e485b010b35a24cabab8ecca1dc94a8a35/cassyy-0.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7a679e383306833ee333f04fd96dfff46f31e08fd999826facc6d8dfed4b37fe",
"md5": "16a698858530cf078d4f422662f402f7",
"sha256": "eed9b9a2b87442d08cffca3a65e2b37fd6f85250281748e130f1f1998e8288dd"
},
"downloads": -1,
"filename": "cassyy-0.0.8.tar.gz",
"has_sig": false,
"md5_digest": "16a698858530cf078d4f422662f402f7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 11126,
"upload_time": "2023-08-25T20:55:08",
"upload_time_iso_8601": "2023-08-25T20:55:08.278108Z",
"url": "https://files.pythonhosted.org/packages/7a/67/9e383306833ee333f04fd96dfff46f31e08fd999826facc6d8dfed4b37fe/cassyy-0.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-25 20:55:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jowage58",
"github_project": "cassyy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cassyy"
}