kolibri-desktop-auth-plugin
Authentication backend that allows an HTTP client to authenticate by providing a desktop user token
Testing
This is a kolibri plugin, you need to install the python package in the kolibri python environment using pip and then enable the plugin.
.../kolibri $ pip install -e ../kolibri-desktop-auth-plugin
.../kolibri $ kolibri plugin enable kolibri_desktop_auth_plugin
To test you can launch the fake user info dbus daemon included in this repository:
./fake-dbus-daemon.py
After enabling the fake dbus daemon you can try to autologin in your kolibri with the plugin opening the following url in your browser:
http://localhost:8000/kolibri_desktop_auth_plugin/login/TOKEN1
You can change the TOKEN at the end of the url above to test with different user data:
- TOKEN1: adminuser, user with admin rights
- TOKEN2: eosuser, user without admin rights
You can test also with a non existent token that should redirect to the login page.
It's also possible to redirect after the authentication passing the next url as a get parameter to the url, for example:
http://localhost:8000/kolibri_desktop_auth_plugin/login/TOKEN1?next=/learn
Development
Setup the Python environment:
pipenv install
Setup pre-commit:
pipenv run pre-commit install
Enter the Python environment for development:
pipenv shell
Releasing
Creating a release
If you are releasing a new version, use bump-version with with major, minor, or patch. For example:
yarn bump-version patch
This creates a new commit and a git tag. Push this to the remote:
git push
git push --tags
Create a .whl file:
python setup.py bdist_wheel --universal
Finally, upload the .whl file to PyPi:
twine check -s dist/*
twine upload -s dist/*
Metadata
Release files for kolibri-desktop-auth-plugin 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kolibri_desktop_auth_plugin-1.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for kolibri_desktop_auth_plugin-1.0.0-py2.py3-none-any.whl |
Release files / kolibri_desktop_auth_plugin-1.0.0-py2.py3-none-any.whl
| Download URL | kolibri_desktop_auth_plugin-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7741f1ac7c6cff392f0228192ed1b981a7812909312552b8a9e642d195a317c6
|
|
BLAKE2b-256 checksum How to use checksums |
6e12642ddff994b0ce1f86fb81835f4977b7caa48a94e927f91493c7888bd666
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.2
|
Security for kolibri-desktop-auth-plugin 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.