Authenticate Rocket.Chat with Django Framework
Project description
Authenticate your Rocket.Chat users with Django web framework.
This app implements the API used by Rocket.Chat IFrame authentication. Also, it handles logout by wiring up a method on Django signals.
Quickstart
Install this app in you project:
pip install django-rocketchat-auth
Add “rocketchat_auth” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'rocketchat_auth', )
Update your settings.py:
MONGO_DB = 'localhost:27017' ROCKETCHAT = 'localhost'
Include the rocketchat_auth URLconf in your project urls.py like this:
urlpatterns += [url(r'^rocketchat/', include('rocketchat_auth.urls'))]
You will probably need to use django-cors-headers and set your Rocket.Chat domain in CORS_ORIGIN_WHITELIST
Now go to your Rocket.Chat admin page > Settings > Accounts. Enable Iframe and set:
Iframe URL: http://localhost:8000/login/?next=/rocketchat/redirect (assuming you have a login page in /login)
URL API: http://localhost:8000/rocketchat/api
Roadmap
Enforce unique email registration in Django admin, since Rocket.Chat requires this.
Update Rocket.Chat user details in MongoDB when the user is modified in Django Admin.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-rocketchat-auth-1.2.tar.gz
.
File metadata
- Download URL: django-rocketchat-auth-1.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07d6b6855ec4e64674565ee46ce6b82a580047b55fd2d8e01b67f84e6e516ac3 |
|
MD5 | 608c28a7a79225764a9a0e4c01a9f86f |
|
BLAKE2b-256 | bda414f72bc149574477b7fa23a3527c469ddf50d9b82f3f0eff8c9eb12937e6 |