TU-Berlin Isis Shibboleth login library
Project description
Shisis - Shibboleth ISIS
Shisis is a small library to handle authentication for TU-Berlin's Moodle instance "ISIS" via Shibboleth.
Install
pip install shisis-async
Usage
CLI
$ shisis -h
usage: shisis [-h] [-u USERNAME] [-p PASSWORD] [-t | -r]
options:
-h, --help show this help message and exit
-u, --username USERNAME
Shibboleth username (environment: SHISIS_USER)
-p, --password PASSWORD
Shibboleth password (environment: SHISIS_PASS)
-t, --token Only print token
-r, --private-token Only print private_token
Code
import asyncio
import aiohttp
from shisis import Shisis
async def main():
async with aiohttp.ClientSession() as session:
shisis = Shisis(session)
tokens = await shisis.authenticate("username", "password")
print(tokens)
asyncio.run(main())
Code with poodle_async_full
import asyncio
import os
import aiohttp
from poodle_async_full import ApiClient, Configuration, DefaultApi
from shisis import Shisis
async def main():
configuration = Configuration(host="https://isis.tu-berlin.de")
async with ApiClient(configuration) as client:
poodle = DefaultApi(client)
config = await poodle.tool_mobile_get_public_config()
async with aiohttp.ClientSession() as shisis_client:
shisis = Shisis(shisis_client)
tokens = await shisis.authenticate(
"username",
"password",
config,
config.identityproviders,
)
configuration.api_key["wstoken"] = tokens.token
site_info = await poodle.core_webservice_get_site_info()
print(site_info.userid)
asyncio.run(main())
License
GPL-3.0
Contributions
Contributions are welcome.
To contribute changes, open a PR on the main branch.
[!NOTE]
Before commiting, runpip install -r requirements-dev.txt && make format && make lintand fix linting errors.
Changelog
See CHANGELOG.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shisis_async-1.2.2.tar.gz.
File metadata
- Download URL: shisis_async-1.2.2.tar.gz
- Upload date:
- Size: 44.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac4415924f8e37b230cfa198bc26723e44febc11f17cb4f9d2a49635f392bce2
|
|
| MD5 |
e7e9a006561906422d56b8879acc3f5c
|
|
| BLAKE2b-256 |
22fbe4a4c1a1d635e29a5b0b7ee4f7696bfbda44ad12f678467b99ea7aee1399
|
Provenance
The following attestation bundles were made for shisis_async-1.2.2.tar.gz:
Publisher:
publish.yml on bchmnn/shisis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shisis_async-1.2.2.tar.gz -
Subject digest:
ac4415924f8e37b230cfa198bc26723e44febc11f17cb4f9d2a49635f392bce2 - Sigstore transparency entry: 579014000
- Sigstore integration time:
-
Permalink:
bchmnn/shisis@f316ebdf3d8719bc78ed932b1e3e6b3a3067e287 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bchmnn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f316ebdf3d8719bc78ed932b1e3e6b3a3067e287 -
Trigger Event:
push
-
Statement type:
File details
Details for the file shisis_async-1.2.2-py3-none-any.whl.
File metadata
- Download URL: shisis_async-1.2.2-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a65983ac020a76d3b416f9056fe3c4e7db64afa11e46adaf302c678c7ec2fb6f
|
|
| MD5 |
7deb39100e0dcb56311019f6dfd15f64
|
|
| BLAKE2b-256 |
9770877931af2fd78cb40b25f42011a1f31b39dd2dc6b9f0729239da9b8644a1
|
Provenance
The following attestation bundles were made for shisis_async-1.2.2-py3-none-any.whl:
Publisher:
publish.yml on bchmnn/shisis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shisis_async-1.2.2-py3-none-any.whl -
Subject digest:
a65983ac020a76d3b416f9056fe3c4e7db64afa11e46adaf302c678c7ec2fb6f - Sigstore transparency entry: 579014026
- Sigstore integration time:
-
Permalink:
bchmnn/shisis@f316ebdf3d8719bc78ed932b1e3e6b3a3067e287 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bchmnn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f316ebdf3d8719bc78ed932b1e3e6b3a3067e287 -
Trigger Event:
push
-
Statement type: