Skip to content
This repository has been archived by the owner on Apr 13, 2018. It is now read-only.

Latest commit

 

History

History
58 lines (37 loc) · 1.35 KB

README.rst

File metadata and controls

58 lines (37 loc) · 1.35 KB

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:

[plugin: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


[plugin:fake]
use = ckanext.oauth2.tests.utils:FakeRememberer

[identifiers]
plugins = oauth2 fake

[authenticators]
plugins = oauth2

[challengers]
plugins = oauth2

[general]
challenge_decider = repoze.who.classifiers:default_challenge_decider
request_classifier = repoze.who.classifiers:default_request_classifier