OAuth2 support for CKAN
by Etalab

OAuth2 CKAN extension

The OAuth2 extension allows site visitors to login through an OAuth2 server.

NOTE: This extension requires ckan version 1.7 or higher.

Activating and Installing

To install the plugin, enter your virtualenv and load the source:

$ pip install ckanext-oauth2
# or
$ pip install git+https://github.com/etalab/ckanext-oauth2.git

Add the following to your CKAN .ini file:

ckan.plugins = oauth2 <other-plugins>

Update your who.ini to make use of OAuth2:

use = ckanext.oauth2.repozewho:make_plugin
authorization_endpoint = https://auth.domain.com/oauth2/authorize/
token_endpoint = https://auth.domain.com/oauth2/token/
client_id = client-id
client_secret = client-secret
scope = profile another.scope
rememberer_name = fake
profile_api_url = https://auth.domain.com/api/me
profile_api_user_field = username

use = ckanext.oauth2.tests.utils:FakeRememberer

plugins = oauth2 fake

plugins = oauth2

plugins = oauth2

challenge_decider = repoze.who.classifiers:default_challenge_decider
request_classifier = repoze.who.classifiers:default_request_classifier

Recent Activity