ORCID integration with CKAN
Project description
ckanext-orcid
ORCID SSO integration for CKAN. Allows users to log in to your CKAN instance using their ORCID iD via OAuth2.
Requirements
Compatibility with core CKAN versions:
| CKAN version | Compatible? |
|---|---|
| 2.10 | not tested |
| 2.11+ | yes |
Installation
- Clone the source and install it on the virtualenv:
git clone https://github.com/DataShades/ckanext-orcid.git
cd ckanext-orcid
pip install -e .
- Add
orcidto theckan.pluginssetting in your CKAN config file:
ckan.plugins = ... orcid
- Run the database migration:
ckan db upgrade
-
Configure your ORCID credentials (see Obtaining ORCID credentials below).
-
Restart CKAN.
Obtaining ORCID credentials
To enable ORCID login you need to register an application in the ORCID developer portal and obtain a Client ID and Client Secret.
Using the sandbox (recommended for development)
The ORCID sandbox is a free test environment with no real user data.
- Create a sandbox account at https://sandbox.orcid.org/register.
- Log in and go to Developer Tools (under your account name menu).
- If prompted, verify your email address first.
- Click Register for the free ORCID public API.
- Fill in the application details:
- Name — your portal's name
- Website URL — your CKAN instance URL (e.g.
http://127.0.0.1:5000) - Description — short description of your portal
- Redirect URIs — add your callback URL:
http://127.0.0.1:5000/orcid/callback(replace the host with your actual domain in production)
- Save. You will be shown a Client ID (format
APP-XXXXXXXXXXXXXXXXX) and Client Secret.
Set in your CKAN config:
ckanext.orcid.client_id = APP-XXXXXXXXXXXXXXXXX
ckanext.orcid.client_secret = your-client-secret
ckanext.orcid.sandbox = true
Using the production ORCID registry
- Log in (or register) at https://orcid.org.
- Go to Developer Tools under your account menu.
- Click Register for the free ORCID public API and follow the same steps as above, using your production redirect URI (e.g.
https://yourckan.example.org/orcid/callback). - Copy the Client ID and Client Secret.
Set in your CKAN config:
ckanext.orcid.client_id = APP-XXXXXXXXXXXXXXXXX
ckanext.orcid.client_secret = your-client-secret
Note:
ckanext.orcid.sandboxdefaults tofalse, so omit it (or set it tofalse) for production.
Members API
Email retrieval from ORCID requires access to the ORCID Members API, which is only available to ORCID member organisations. The public API used above supports authentication (verifying a user's identity) but not reading private profile data such as email addresses. If your organisation is an ORCID member, contact ORCID support to obtain member API credentials and a separate client ID/secret with the /read-limited scope.
Config settings
| Setting | Required | Default | Description |
|---|---|---|---|
ckanext.orcid.client_id |
yes | — | OAuth2 Client ID from the ORCID developer portal |
ckanext.orcid.client_secret |
yes | — | OAuth2 Client Secret from the ORCID developer portal |
ckanext.orcid.sandbox |
no | false |
Set to true to use the ORCID sandbox environment |
Tests
pytest --ckan-ini=test.ini
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ckanext_orcid-0.1.0.tar.gz.
File metadata
- Download URL: ckanext_orcid-0.1.0.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29912ed5727f6e6c5473644012d5c367362e520c251373927e01d07f8e989b05
|
|
| MD5 |
535eb2858d4cabb6c4327910c1852cb2
|
|
| BLAKE2b-256 |
d876bc9bc7ee9d17245094add977486c1a14d7a6f35a9f22da5b9ef961ed7904
|
File details
Details for the file ckanext_orcid-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ckanext_orcid-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c77fc08eb7d8413978ed8d710e9ace78d2ada5d7fb80414503da7d9150cb67c
|
|
| MD5 |
8e47e6bd875d87173f07566c7086b7f1
|
|
| BLAKE2b-256 |
2179115164e5b91551c2334d98c2b3fb0bb236b89017f6c70397064877bdb0ee
|