1 minute read.Credential Checking at Crossref
It turns out that one of the things that is really difficult at Crossref is checking whether a set of Crossref credentials has permission to act on a specific DOI prefix. This is the result of many legacy systems storing various mappings in various different software components, from our Content System through to our CRM.
To this end, I wrote a basic application, credcheck, that will allow you to test a Crossref credential against an API.
There are two modes of usage. First, a command-line interface that allows you to run a basic command and get feedback:
     Usage: cli.py [OPTIONS] USERNAME PASSWORD DOI
Second, you can use it as a programmatic library in Python:
     import cred
     credential = cred.Credential(username=username, password=password, doi=doi)
     if not credential.is_authenticated():
     …
     if credential.is_authorised():
     …
The tool splits down authentication (whether the given username and password are valid) and authorisation (whether the valid credentials are usable against a specific DOI/prefix).
For technical information, the way this works is by attempting to run a report on the specific DOI in question and then scraping the response page. We hope, at some future point, that there will be a real API for this, but for now this solves the problem as a bridge.
Further reading
- Apr 3, 2024 – Testing times
- Sep 28, 2023 – Feedback on automatic digital preservation and self-healing DOIs
- Jun 29, 2023 – A Request for Comment - Automatic Digital Preservation and Self-Healing DOIs
- Jun 21, 2023 – Crossref Research and Development: Releasing our Tools from the Ground Up
- Aug 26, 2022 – Martin Paul Eve is joining our R&D group as a Principal Developer
- Jun 10, 2022 – Announcing our new Head of Strategic Initiatives: Dominika Tkaczyk
- Mar 22, 2022 – Follow the money, or how to link grants to research outputs
- Jun 7, 2021 – Time to put the "R" back in "R&D"