Skip to main content

Kolibri plugin for desktop authentication

Project description

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/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kolibri_desktop_auth_plugin-0.0.7-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file kolibri_desktop_auth_plugin-0.0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: kolibri_desktop_auth_plugin-0.0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for kolibri_desktop_auth_plugin-0.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f1920b49fd0805fe45aa3024b047690d107617efb1932c0100860a156ab39448
MD5 f6e28e77b0472e0120529bbbdc94a030
BLAKE2b-256 bcfef9a5b62da8daf554eb5e7a28283cfb01f401618902c18012df0011585c7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page