15.6. Expire and renew federation registrations
Feature guides / 15. OIDC and OAuth workflows · Example context
LIGO Wiki registered successfully yesterday, but Umeå University OP's supporting chain expires today. The application must stop treating yesterday's response as an indefinite registration.
How to use it
ExplicitRegistrationResult exposes both the registration expiry and the OP chain expiry. Retain the earlier deadline with the client record. Automatic registration likewise relies on fresh chain evidence; follow the returned operation's lifetime rather than inventing a permanent cache entry.
import type { ExplicitRegistrationResult } from "@oidfed/oidc";
export function registrationIsCurrent(registration: ExplicitRegistrationResult, now: number) {
return now < Math.min(registration.expiresAt, registration.trustChainExpiresAt);
}
What your application owns
Your OP/RP stores and schedules registration renewal. onRegistrationInvalidation is a late hook, not a general early accreditation decision point. Removing local cache entries does not inform all peers. Couple renewal failures to an explicit application policy; do not overwrite a known expiry with a new local TTL simply because a lookup failed.
Refresh the evidence behind the client record
Umeå should retain enough information to know when a dynamically established client registration no longer has fresh federation evidence. LIGO Wiki likewise needs to know when its saved OP assessment or explicit registration response can no longer support a new operation.
A non-expiring client secret value does not make the federation registration immortal. On refresh failure, follow the host's policy for new requests and existing sessions rather than extending the signed lifetime locally. Keep renewal and incident handling observable without logging the secret itself.
Registration lifetime enforcement
Federation §12.3 requires an OP registration to expire no later than the RP chain used to establish it. The RP must also stop using registration when its selected OP chain expires, then successfully reevaluate trust for automatic registration or renew explicit registration.
The explicit handler caps its signed response expiry to the RP chain, including the submitted Entity Configuration. OP automatic processing returns the validated RP trustChain. RP automatic and explicit registration return the selected OP chain's expiry as trustChainExpiresAt. An explicitly registered RP must renew before the earlier of expiresAt and trustChainExpiresAt.
Your application persists and enforces these deadlines in its client database and request processing. onRegistration receives client metadata and an optional secret; obtain the registration deadline from the signed response when storing the OP's client record. See the integration responsibilities.