Name | NEMO-allauth JSON |
Version |
2.0.3
JSON |
| download |
home_page | None |
Summary | Install Allauth plugin for NEMO |
upload_time | 2024-12-14 21:56:30 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License Copyright (c) 2023 Atlantis Labs LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
nemo
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
===============
NEMO Allauth
===============
NEMO plugin to add social account authentication support to your NEMO instance.
This plugin is a wrapper around the great django-allauth plugin, allowing you to setup any social login with NEMO effortlessly.
For more information on django-allauth please visit
https://django-allauth.readthedocs.io/
Description
============
This plugin"s goal is to allow users to sign in to NEMO with their social accounts.
Due to NEMO"s usage in labs to control area access and tool access, it is not advised to allow users to automatically signup.
For that reason, allauth signup is disabled.
The flow and process of adding users and having them log in via social credentials is a bit different:
1. New users can **only** be added from within NEMO itself.
2. The user"s email will be used to login and needs to be verified both in NEMO and by the social account provider (most do).
3. The user"s email address in NEMO needs to match the one provided by the social account.
Installation
============
1. install library
``pip install NEMO-allauth["socialaccount"]``
2. in settings.py add to your INSTALLED_APPS:
``"django.contrib.sites",``
...
``"NEMO",``
``"NEMO_allauth",`` (**has to be between NEMO and allauth**)
``"allauth",``
``"allauth.account",``
``"allauth.socialaccount",``
followed by the social account providers you'd like to use, for example:
``"allauth.socialaccount.providers.google",``
(A complete list with more detailed information is available at https://django-allauth.readthedocs.io/)
3. In settings.py add to your MIDDLEWARE:
``"allauth.account.middleware.AccountMiddleware"``
4. for each provider, you can set its configuration in settings.py:
::
SOCIALACCOUNT_PROVIDERS = {
"openid_connect": {
"APPS": [
{
"provider_id": "keycloak",
"name": "Keycloak",
"client_id": "<insert-id>",
"secret": "<insert-secret>",
"settings": {
"server_url": "<insert-url>/realms/<insert-realm>/.well-known/openid-configuration",
},
}
]
}
"google": {
"APP": {
"client_id": "<client_id>",
"secret": "<secret>"
}
}
}
5. in settings.py set authentication backend to:
``AUTHENTICATION_BACKENDS = ["allauth.account.auth_backends.AuthenticationBackend"]``
6. in settings.py, set django's login and logout URLs to:
``LOGIN_URL = "account_login"``
``LOGIN_REDIRECT_URL = "landing"``
``LOGOUT_REDIRECT_URL = "account_logout"``
if you only support one social provider (google for example), you can bypass the login screen by setting:
``LOGIN_URL = "google_login"``
7. add to context_processors:
``"NEMO.context_processors.show_logout_button",``
Post Installation
=================
1. run:
``python manage.py migrate``
2. login to NEMO detailed administration and update the ``example.com`` site with the appropriate domain and display name (don't add the http part of your domain).
Customizing emails
==================
You can customize the emails being sent (a list can be found `here <https://django-allauth.readthedocs.io/en/latest/advanced.html#sending-email>`_)
To do that, place the filename in your NEMO `media` folder, for example to customize the subject `account/email/email_confirmation_subject.txt`, place `email_confirmation_subject.txt` in your `media` folder.
For emails, to customize `account/email/email_confirmation_message.txt`, place `email_confirmation_message.txt` to your `media` folder.
Both `.html` and `.txt` can be used for email messages.
Options
=======
By default, this plugin will send email verification emails to newly created users or users whose email has been changed.
You can turn this off by setting:
``SEND_EMAIL_VERIFICATION_ON_USER_SAVE = False``
By default, superuser email are considered verified. You can change that by adding in your settings.py:
``TRUST_SUPERUSERS_EMAIL = False``
You also can add a extra ajax url to be called on logout (before logout redirect url) by using:
``AJAX_BEFORE_LOGOUT_URL = <URL>``
Although not recommended, unverified emails coming from a specific provider (who for some reason cannot guarantee the email is owned by the user) can be marked as verified by setting the following:
::
SOCIALACCOUNT_PROVIDERS = {
"microsoft": {
"trust_emails": True,
...
}
}
NEMO User admin
===============
In the detailed administration section of NEMO, actions were added to the User table. After selecting one or more users:
1. To send a verification email to the user's email address
2. To mark the user's email address as verified (use at your own risk)
Raw data
{
"_id": null,
"home_page": null,
"name": "NEMO-allauth",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "NEMO",
"author": null,
"author_email": "Atlantis Labs LLC <atlantis@atlantislabs.io>",
"download_url": null,
"platform": null,
"description": "===============\nNEMO Allauth\n===============\n\nNEMO plugin to add social account authentication support to your NEMO instance.\n\nThis plugin is a wrapper around the great django-allauth plugin, allowing you to setup any social login with NEMO effortlessly.\n\nFor more information on django-allauth please visit\nhttps://django-allauth.readthedocs.io/\n\nDescription\n============\nThis plugin\"s goal is to allow users to sign in to NEMO with their social accounts.\n\nDue to NEMO\"s usage in labs to control area access and tool access, it is not advised to allow users to automatically signup.\nFor that reason, allauth signup is disabled.\n\nThe flow and process of adding users and having them log in via social credentials is a bit different:\n\n1. New users can **only** be added from within NEMO itself.\n\n2. The user\"s email will be used to login and needs to be verified both in NEMO and by the social account provider (most do).\n\n3. The user\"s email address in NEMO needs to match the one provided by the social account.\n\nInstallation\n============\n1. install library\n\n ``pip install NEMO-allauth[\"socialaccount\"]``\n\n2. in settings.py add to your INSTALLED_APPS:\n\n ``\"django.contrib.sites\",``\n\n ...\n\n ``\"NEMO\",``\n\n ``\"NEMO_allauth\",`` (**has to be between NEMO and allauth**)\n\n ``\"allauth\",``\n\n ``\"allauth.account\",``\n\n ``\"allauth.socialaccount\",``\n\nfollowed by the social account providers you'd like to use, for example:\n\n ``\"allauth.socialaccount.providers.google\",``\n\n(A complete list with more detailed information is available at https://django-allauth.readthedocs.io/)\n\n3. In settings.py add to your MIDDLEWARE:\n\n ``\"allauth.account.middleware.AccountMiddleware\"``\n\n4. for each provider, you can set its configuration in settings.py:\n\n::\n\n SOCIALACCOUNT_PROVIDERS = {\n \"openid_connect\": {\n \"APPS\": [\n {\n \"provider_id\": \"keycloak\",\n \"name\": \"Keycloak\",\n \"client_id\": \"<insert-id>\",\n \"secret\": \"<insert-secret>\",\n \"settings\": {\n \"server_url\": \"<insert-url>/realms/<insert-realm>/.well-known/openid-configuration\",\n },\n }\n ]\n }\n \"google\": {\n \"APP\": {\n \"client_id\": \"<client_id>\",\n \"secret\": \"<secret>\"\n }\n }\n }\n\n5. in settings.py set authentication backend to:\n\n ``AUTHENTICATION_BACKENDS = [\"allauth.account.auth_backends.AuthenticationBackend\"]``\n\n6. in settings.py, set django's login and logout URLs to:\n\n ``LOGIN_URL = \"account_login\"``\n\n ``LOGIN_REDIRECT_URL = \"landing\"``\n\n ``LOGOUT_REDIRECT_URL = \"account_logout\"``\n\nif you only support one social provider (google for example), you can bypass the login screen by setting:\n\n ``LOGIN_URL = \"google_login\"``\n\n7. add to context_processors:\n\n ``\"NEMO.context_processors.show_logout_button\",``\n\n\nPost Installation\n=================\n\n1. run:\n\n ``python manage.py migrate``\n\n2. login to NEMO detailed administration and update the ``example.com`` site with the appropriate domain and display name (don't add the http part of your domain).\n\n\nCustomizing emails\n==================\nYou can customize the emails being sent (a list can be found `here <https://django-allauth.readthedocs.io/en/latest/advanced.html#sending-email>`_)\n\nTo do that, place the filename in your NEMO `media` folder, for example to customize the subject `account/email/email_confirmation_subject.txt`, place `email_confirmation_subject.txt` in your `media` folder.\n\nFor emails, to customize `account/email/email_confirmation_message.txt`, place `email_confirmation_message.txt` to your `media` folder.\n\nBoth `.html` and `.txt` can be used for email messages.\n\n\nOptions\n=======\nBy default, this plugin will send email verification emails to newly created users or users whose email has been changed.\nYou can turn this off by setting:\n\n ``SEND_EMAIL_VERIFICATION_ON_USER_SAVE = False``\n\nBy default, superuser email are considered verified. You can change that by adding in your settings.py:\n\n ``TRUST_SUPERUSERS_EMAIL = False``\n\nYou also can add a extra ajax url to be called on logout (before logout redirect url) by using:\n\n ``AJAX_BEFORE_LOGOUT_URL = <URL>``\n\nAlthough not recommended, unverified emails coming from a specific provider (who for some reason cannot guarantee the email is owned by the user) can be marked as verified by setting the following:\n\n::\n\n SOCIALACCOUNT_PROVIDERS = {\n \"microsoft\": {\n \"trust_emails\": True,\n ...\n }\n }\n\n\n\nNEMO User admin\n===============\nIn the detailed administration section of NEMO, actions were added to the User table. After selecting one or more users:\n\n1. To send a verification email to the user's email address\n\n2. To mark the user's email address as verified (use at your own risk)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Atlantis Labs LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Install Allauth plugin for NEMO",
"version": "2.0.3",
"project_urls": {
"CI": "https://gitlab.com/nemo-community/atlantis-labs/nemo-allauth/-/pipelines",
"Changelog": "https://gitlab.com/nemo-community/atlantis-labs/nemo-allauth/-/releases",
"Homepage": "https://gitlab.com/nemo-community/atlantis-labs/nemo-allauth",
"Issues": "https://gitlab.com/nemo-community/atlantis-labs/nemo-allauth/-/issues"
},
"split_keywords": [
"nemo"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bc4f37eb46d92a01cad1e6e1ccc649742703cbf0c65207bae9c3d0ca8f9191bd",
"md5": "61db8f781fd6ec3e8ee5cc5c959f189f",
"sha256": "4e62f343d66e561440e800249cfdf1641f2334043a75377dc10b97c0fc67a558"
},
"downloads": -1,
"filename": "NEMO_allauth-2.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "61db8f781fd6ec3e8ee5cc5c959f189f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 18055,
"upload_time": "2024-12-14T21:56:30",
"upload_time_iso_8601": "2024-12-14T21:56:30.130131Z",
"url": "https://files.pythonhosted.org/packages/bc/4f/37eb46d92a01cad1e6e1ccc649742703cbf0c65207bae9c3d0ca8f9191bd/NEMO_allauth-2.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-14 21:56:30",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "nemo-community",
"gitlab_project": "atlantis-labs",
"lcname": "nemo-allauth"
}