The Django RBE Authorize is a simple app that once enabled in the installed apps allows the authentication through the RBE Network Core.
Add "rbe_authorize" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'rbe_authorize', ]
Include the rbe_authorize URLconf in your project urls.py like this:
url(r'^', include('rbe_authorize.urls')),
Run python manage.py migrate to create the rbe_authorize models.
- Configure the settings.py to set the configurations for
- SITE_URL = 'https://rbe-network.org'
- CLIENT_ID = The client id that you get from the RBE Network
- CLIENT_SECRET = The client secret you get from the RBE Network
- CLIENT_SCOPE = The client scope you need for your app eg. ('identity')
- CLIENT_URL = Your page url eg. ('http://localhost:9090')
- Start the development server and put a page in place that you can visit
- Put the snippet {% include 'rbe_authorize.html' %} in the template and include bootstrap or style the link
- Click the link and see how you are forwarded and redirected back to your page
- You should be redirected to the AFTER_LOGIN_URL and can use the User, Profile and Token model to build the experience