Course-badge issuance
Configure the optional Moodle plugin to deliver an earned course badge to a wallet.
Add wallet delivery for an earned Moodle course badge with the optional local_veridissuer plugin. Authentication continues to use Moodle's built-in OAuth 2 login through Keycloak; it does not need this plugin.
This example uses a separate DEMO courseBadge credential in Yivi. It represents the course badge, not an accredited diploma.
What you need
- Moodle 4.5.15 LTS, PHP 8.3, cURL, OpenSSL, Sodium and working Moodle cron.
- A course with an active badge, an enrolled student and a recorded, unexpired badge award.
- The Moodle issuer package (ZIP). It includes
firebase/php-jwt7.2.1 and its licence notices. - A Studio issuance containing the course-badge credential, an active brand and an attached OAUTH secret.
- The example credential schema enabled for Yivi and an institution policy for delivering the badge to the intended recipient. Moodle login does not establish ownership of the receiving wallet.
Install the plugin
Extract veridissuer into <moodle-installation>/local/veridissuer. Run Moodle's normal plugin upgrade, then open Site administration → Plugins → Local plugins → Ver.iD DEMO course badges. Keep delivery disabled while configuring it.
Configure Ver.iD
In Ver.iD Studio → Issue → Issuances → your flow → Redirect URIs, add <moodle-base-url>/local/veridissuer/callback.php. Configure these mapping inputs as strings:
| Input | Moodle value |
|---|---|
courseName | Course title |
badgeId | Awarded Moodle badge identifier |
issuedAt | Award timestamp in UTC ISO format |
institution | Configured institution label |
Select the course-badge credential, attach the OAUTH secret and activate the flow. The plugin sends these four values; it does not send the student's name, email or grade.
Save the Moodle settings
| Field | Value |
|---|---|
| Exact HTTPS discovery issuer | https://ssi.oauth.ver.id/ |
| Issuance flow client UUID | Your issuance flow's client identifier from Studio |
| OAUTH secret Key (as base64url) | The attached secret's value, entered privately |
| Studio organization UUID | The organization owning the issuance flow |
| Trusted expected issuance JWT signing issuer (URN) | The trusted signing issuer from your platform configuration; distinct from the discovery URL |
| Demo institution label | Your institution's demonstration label |
Under Course badge mappings, select the Moodle badge and enter its Expected catalog credential UUID from Studio. Enable that mapping, then enable Enable this DEMO delivery service and save.
The plugin is adapted from Talao's EUDI Wallet Badge issuance plugin for Ver.iD's redirect-issuance contract. Its NOTICE.md identifies the source and changes. The upstream Wallet Connectors API settings are not interchangeable with these settings.
Check wallet delivery
- As the enrolled student, complete the course requirements and wait for Moodle to award the badge.
- Open My demo wallet badges and select Continue to demo Yivi issuance.
- Review and accept the credential in Yivi, then return to the original Moodle browser.
- Confirm Moodle shows Issued and the course badge appears in the wallet.
Issued means the signed service receipt confirmed issuance. Repeated clicks reuse the same award request. For an uncertain or expired result, reconcile the existing run in platform records before retrying; do not remove the duplicate guard. An ineligible student must not be able to start delivery.