A credential is a verifiable claim, like a badge, certificate, or access token, tied to an issuer and a holder. “Sorted” describes the order in which a collection of those credentials gets displayed or returned, based on a field like issue date or expiration. Confusing the two leads to broken search, misleading verification states, and wallets that show expired badges above valid ones.
TL;DR:
- Sorting credentials by issue or expiration date prevents expired badges from appearing above valid ones, reducing user confusion and verification errors.
- Implementing consistent metadata fields such as issuer DID, holder ID, issue and expiration dates, and revocation status is essential before establishing sort logic.
- Use stable pagination with explicit sort keys like issuance or expiration date and enforce default rules like hiding expired credentials to ensure reliable user experiences.
- Credential type models—such as degrees, badges, or tokens—dictate mandatory metadata, making early schema design choices critical for interoperability.
- Prioritize basic sorting and schema consistency first; comprehensive profile comparison should only occur when integrating multiple issuers or supporting offline verification mechanisms.
Table of Contents
- Credential vs Sorted: What Each Term Actually Means
- Credential Data Types and Taxonomies Developers Should Model
- How to Sort and Filter Credentials in Real Systems
- Credential Profile Comparison Matrix: Technical Dimensions That Matter
- What Implementers Should Actually Prioritize First
- Standards and Tools Worth Bookmarking
- Why Most Teams Get the Credential vs Sorted Question Backward
- Sources
- FAQ
Credential vs Sorted: What Each Term Actually Means
A credential is a discrete, verifiable object: a digital badge, a paper certificate, a service token, or a cryptographic proof of qualification. It exists independently of any list. “Sorted,” by contrast, is not a property of the credential itself. It describes the state of a collection: whether the items in it follow a defined order, like newest first, alphabetical by issuer, or grouped by expiration status.
This distinction matters the moment you build anything that displays more than one credential. A digital wallet holding a driver’s license, a professional certification, and a conference badge doesn’t need those three items “sorted” to be valid. Each credential works fine in isolation. But the second a user opens their wallet and expects to see the most recent item first, sorting becomes a UX and engineering requirement layered on top of data that was never inherently ordered.
The practical stakes show up in three places, as detailed in the Identity People WooCommerce and ecommerce case study which illustrates identity and wallet capabilities in retail contexts:
- Search and retrieval: A credential store returning unsorted results forces the client to re-sort on every request, wasting cycles and risking inconsistent display across sessions.
- Verification workflows: An expired credential sitting at the top of an unsorted list can get selected by mistake during an automated check, as documented in a Jenkins credentials binding bug where duplicate IDs were resolved alphabetically instead of by relevance.
- User trust: People scanning a wallet for their most recent certification expect recency-first order by default, not database insertion order.
Credential Data Types and Taxonomies Developers Should Model
Before you can sort credentials meaningfully, you need a consistent model of what a credential actually contains. Credential Engine’s CTDL publishes a canonical taxonomy that most credential systems either adopt directly or mirror closely: badges, certificates, certifications, degrees, diplomas, licenses, and micro-credentials, each with defined subclasses.
That taxonomy matters for engineers because credential type determines which metadata fields are mandatory. A degree needs an accreditation body reference. A micro-credential often needs a competency framework link. A service token needs neither but does need a scope and a revocation endpoint.
At minimum, plan to store these fields regardless of credential type:
- Identifier: a globally unique credential ID, often a URI or DID-based string.
- Issuer reference: the issuing organization’s decentralized identifier (DID) or registered entity ID.
- Holder reference: the DID or account ID of the credential’s subject.
- Issuance date: when the credential was created or granted.
- Expiration date: nullable for credentials that never expire, but the field should always exist.
- Evidence: a link or hash referencing supporting documentation.
- Revocation status: a flag or endpoint indicating whether the credential is still valid.
Pro Tip: Even if your first version only supports one credential type, add the issuer DID and revocation flag columns from day one. Retrofitting revocation checks into a schema that never planned for them is far more expensive than adding an unused column early.
Skipping the taxonomy step is the single most common reason credential systems need a painful schema migration within their first year of production use.
How to Sort and Filter Credentials in Real Systems
Sorting only becomes interesting once you have more than a handful of credentials per user, which happens fast in any wallet or verification platform. Dock Wallet’s sorting and filtering feature is a useful real-world reference: it sorts by issuance date and expiration date, and filters by credential type, issuer DID, holder DID, and a “hide expired” toggle.
Here’s a practical build order for implementing this yourself:
- Pick your sort keys first.
issuedAtandexpiresAtcover most use cases.issuerandtypesupport grouping.displayNamesupports alphabetical fallback when dates are missing. - Expose sort parameters explicitly in your API. Common patterns use
sortBy(which field) andsortOrder(ascordesc), paired withlimitandcursorfor pagination, as shown in typical credential listing API references. - Keep cursors stable. A pagination cursor only works reliably when every subsequent request uses the identical sort and filter parameters as the first request. Change the sort key mid-pagination and you risk skipped or duplicated items.
- Use key functions, not custom comparators, in code. Python’s
sorted()andlist.sort()both accept akeyfunction that’s called once per item, which is faster and clearer than writing a manual comparison function, according to the Python sorting documentation. - Decide your default UX rules up front. Hide expired credentials by default but let users toggle them back on. Group by credential type when a wallet holds five or more items. Let users save a custom sort as their default view.
Stability matters more than cleverness here. A sort that silently reorders identical values differently on each request will break user trust faster than any missing feature.
Credential Profile Comparison Matrix: Technical Dimensions That Matter
Once you’re choosing between credential formats, sorting stops being the hard part. The real work is comparing credential profiles, meaning the underlying technical properties that determine whether two systems can actually talk to each other. A credential profile comparison matrix built around a consistent set of axes keeps that comparison honest instead of vibes-based.
Six axes cover most real decisions:
- Credential format: W3C Verifiable Credentials, AnonCreds, ISO mDL, and similar formats structure claims differently and are not automatically interoperable.
- Signature algorithm and crypto properties: determines whether verification can happen offline and how resistant the credential is to forgery.
- Revocation mechanism: status lists, revocation registries, or short-lived credentials each trade off privacy against verification complexity.
- Key management and storage: whether keys live in a hardware wallet, a mobile secure enclave, or a cloud custodial service changes your threat model entirely.
- Interoperability and standards support: whether the format is recognized by NIST’s guidance on verifiable digital credentials or other government-facing standards bodies.
- Selective disclosure and privacy features: whether a holder can prove one claim (age over 21) without revealing the entire credential.
Gathering accurate data for each cell takes real verification work: reading vendor documentation, running interoperability test vectors, and checking whether claimed standards support actually holds up against a second implementation. Evaluation tools like Education Design Lab’s CredCompare extend this further by scoring wallet and issuing platforms on accessibility and data control, not just cryptography, which matters if your credential system serves the general public rather than only technical users.
Which axes matter most depends on your use case. Offline verification leans hard on signature algorithm choice. Multi-party enterprise integration leans on interoperability and revocation mechanism. Consumer-facing privacy products live or die on selective disclosure support.
What Implementers Should Actually Prioritize First
Most teams over-invest in sorting logic before they’ve nailed the basics. Start with canonical IDs, an issuer field, issuance and expiry dates, a revocation flag, and one or two sort keys. That covers a working wallet or verification tool.

Only run a full profile comparison matrix when you’re integrating multiple issuers, supporting offline verification, or building a high-assurance system where a wrong crypto choice is expensive to undo. Test interoperability early. A schema that looks fine in isolation often fails the moment a second organization’s credentials hit it.
Standards and Tools Worth Bookmarking
These are the primary references behind the taxonomy, sorting patterns, and comparison framework covered above:
- Credential Data Types from Credential Engine, for canonical credential type definitions and subclasses.
- New Dock Wallet Feature: Sorting and Filtering Credentials, for a real implementation of sort keys and filters.
- vcstuff/credential-profile-comparison, for the matrix methodology used to compare credential formats.
- Digital identities: getting to know verifiable digital credentials, NIST’s guidance on signatures, revocation, and key management.
Why Most Teams Get the Credential vs Sorted Question Backward
The conventional advice treats sorting as a UI afterthought, something you bolt on once the credential schema is “done.” That’s backward. Every sort key you expose is a promise about what your data guarantees. If you let clients sort by expiresAt but your schema allows null expiration dates without a documented fallback, you’ve shipped an inconsistency that will surface as a support ticket eventually, not a design decision.
The more interesting failure mode isn’t sorting at all. It’s teams that reach for a full credential-profile comparison matrix, complete with signature algorithm trade-offs and revocation mechanism debates, before they’ve settled on basic field names. Comparing AnonCreds against ISO mDL is wasted effort if your issuer field sometimes holds a DID and sometimes holds a plain string. Fix the boring parts first.
If there’s one thing worth internalizing from the Jenkins alphabetical-ordering incident, it’s that implicit sort order is never actually neutral. Somebody’s alphabetically-first credential quietly wins in a tie, and nobody notices until it’s the wrong one. Explicit beats implicit, every time, in credential systems more than almost anywhere else in software.
— rodrigues
Sources
- Credential Data Types
- New Dock Wallet Feature: Sorting and Filtering Credentials
- Digital identities: getting to know verifiable digital credentials
FAQ
What Are the Three Types of Credentials?
Credential taxonomies vary by field, but a common breakdown used in education and workforce systems splits credentials into degrees, certificates, and licenses or certifications. Credential Engine’s CTDL defines a broader set that also includes badges and micro-credentials, since digital and workplace credentialing has expanded well past the traditional three-category model.
In What Order Do You List Credentials?
There’s no single universal rule, but the common convention lists credentials from highest to lowest level of achievement, such as a doctoral degree before a bachelor’s degree, or a professional license before a completion certificate. In digital systems, order more often depends on your chosen sort key, like issuance date or credential type, rather than a fixed hierarchy.
What Does “Credentials” Mean?
A credential is a verifiable proof of a qualification, achievement, or authorization, issued by a trusted party to a holder. That can be a physical diploma, a digital badge, a professional certification, or a cryptographic access token used for authentication.
What Are the Different Types of Credentials?
Common categories include academic credentials (degrees, diplomas), professional credentials (licenses, certifications), digital badges for specific skills, micro-credentials for narrow competencies, and service credentials or tokens used in authentication systems. Each type typically carries different metadata requirements, such as accreditation references for degrees or scope definitions for service tokens.
How Is “Sorted” Different From “Credential Validation”?
Sorting arranges a collection of credentials by a chosen field, like date or issuer, while validation checks whether an individual credential is authentic and still active. A wallet can display a perfectly sorted list that still contains a revoked or expired credential if validation hasn’t run separately, which is why the two processes need to stay distinct in system design.