JSKOS wrapper to the public ORCID API
The Open Researcher and Contributor ID (ORCID) is a code to uniquely identify scientific and other academic authors and contributors. ORCID identifiers are a subset of the International Standard Name Identifier (ISNI) consisting of 16 digits in four groups. The final character may also be an
X. The identifier is prefixed by
http://orcid.org/ to get an URI. For example:
ORCID organization provides a public API to access and search for ORCID profiles. Access to the API requires credentials in form of a "client id" and a "client secret" as decribed at http://support.orcid.org/knowledgebase/articles/343182.
Requires the jskos-php PHP library.
You also need client credentials from your ORCID profile to access the ORIC API.
composer require gbv/jskos-bartoc
This will automatically create
composer.json for your project (unless it already exists) and add orcid-jskos as dependency. Composer also generates
vendor/autoload.php to get autoloading of all dependencies.
The wrapper can be used as instance of class
ORCIDService, a subclass of
require 'vendor/autoload.php'; $service = new ORCIDService($client_id, $client_secret);
See jskos-php-examples for an example how to use the wrapper as part of a larger PHP application.
To use as server you also need an implementation of
$ composer require php-http/guzzle6-adapter
Locally run the application on port 8080 as following:
$ composer install $ ORCID_CLIENT_ID=... ORCID_CLIENT_SECRET=... php -S localhost:8080
You can also put credentials into
credentials.php as described above.
Given valid credentials, ORCID profiles can be accessed in JSKOS like this:
composer installto download dependencies into directory
Add a file
credentials.phpwith client credentials as following:
<?php define('ORCID_CLIENT_ID', '...'); define('ORCID_CLIENT_SECRET', '...');
You may add a rule to disallow direct access to all except
Require all denied <Files index.php> Require all granted </Files>
$ heroku create $ heroku config:set ORCID_CLIENT_ID=... $ heroku config:set ORCID_CLIENT_SECRET=... $ git push heroku master
Bugs and feature request are tracked on GitHub.
CONTRIBUTING.md of repository jskos-php for general guidelines.
Jakob Voß firstname.lastname@example.org
orcid-jskos is licensed under the LGPL license (see
LICENSE for details).