You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extensions are modelled as typed Go values rather than an untyped map. Every extension with a defined client input gains a dedicated `webauthn.WithExtension<Name>` option applied via `WithExtensions` or `WithAssertionExtensions`, and its client and authenticator outputs are decoded into typed fields of `protocol.AuthenticationExtensionsClientOutputs` and `protocol.AuthenticatorExtensionOutputs`. An identifier with no dedicated option is still reachable verbatim through `webauthn.WithExtension`, and any output returned under it is preserved in the relevant `Extra` map rather than discarded.
`SessionData` now records which extensions the Relying Party requested so the finish step can reject client outputs that were never solicited, with `Config.ExtensionsUnsolicitedOutputPolicy` relaxing that for deployments whose clients are known to return outputs unprompted. The msgp encoding of the session carries a shadow type for the new extension state, and go 1.24 is dropped from the supported versions.
BREAKING CHANGE: `RegistrationOption` and `LoginOption` now return an error, so any option implemented outside this module must be adjusted, and `WithExtensions` and `WithAssertionExtensions` accept extension options in place of a map. `protocol.AuthenticationExtensions` and `protocol.AuthenticationExtensionsClientOutputs` are structs rather than `map[string]any`, `protocol.Extensions` is removed, and `ParsedPublicKeyCredential.GetAppID` takes a `protocol.SessionExtensions`. `SessionData.Extensions` changes both its type and its encoded representation, so a session persisted by an earlier version cannot be decoded by this one, and a client extension output the Relying Party did not request now fails the ceremony unless `Config.ExtensionsUnsolicitedOutputPolicy` says otherwise.
|[Large Blob Key Extension](https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#sctn-largeBlobKey-extension)|`largeBlobKey`| Not modelled[^3]| Not modelled[^3]|
177
+
|[PIN Complexity Extension](https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#sctn-pincomplexitypolicy-extension)|`pinComplexityPolicy`| Not modelled[^4]| N/A[^1]|
178
+
|[HMAC Secret MakeCredential Extension](https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#sctn-hmac-secret-make-cred-extension)|`hmac-secret-mc`| Not modelled[^4]| N/A[^1]|
179
+
|[Third-Party Payment Authentication Extension](https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#sctn-thirdPartyPayment-extension)|`thirdPartyPayment`| Not modelled[^4]| Not modelled[^4]|
180
+
181
+
The CTAP authenticator data also carries a `hmac-secret` extension output identifier (`protocol.ExtensionHMACSecret`),
182
+
distinct from the `hmacCreateSecret` / `hmacGetSecret` client-facing identifiers above; it is decoded automatically
183
+
into `AuthenticatorExtensionOutputs.HMACSecret` / `HMACSecretOutput` and is not something a Relying Party requests.
170
184
171
185
[^1]: This extension is only applicable during Registration.
172
186
[^2]: This extension is only applicable during Authentication.
187
+
[^3]: Deliberately not modelled. CTAP 2.3 §12.3 defines no client extension input, output, or processing for
188
+
`largeBlobKey`: it is a CTAP response member returned directly to the platform, not to the Relying Party.
189
+
`protocol.ExtensionLargeBlobKey` is kept as a documented identifier and remains reachable verbatim via
190
+
`webauthn.WithExtension`.
191
+
[^4]: Not modelled. Set on input with `webauthn.WithExtension`; an output returned under this identifier is
192
+
preserved in the outputs' `Extra` map.
193
+
[^5]: `uvm` was deprecated from the core WebAuthn spec text at Level 3 (see the deprecated extensions table
194
+
below) but remains registered as a CTAP 2.1/2.2/2.3 extension in the IANA registry and is still forwarded by
195
+
several clients, hence a dedicated option.
173
196
174
197
Extensions that have been deprecated and removed from the spec. The deprecated level is the first spec level that did
175
-
not include the extension. These are all technically supported by the extensions map, but have no official support from
176
-
this library, and are most likely not supported by either browsers or authenticators.
198
+
not include the extension. These are all technically reachable as untyped values via `webauthn.WithExtension`, but
199
+
have no official (typed) support from this library, and are most likely not supported by either browsers or
200
+
authenticators. The one exception is `uvm`: it remains registered as a CTAP extension and is modelled, so
201
+
`webauthn.WithExtension` rejects it and `webauthn.WithExtensionUVM` is used instead.
177
202
178
203
These extensions often either were excluded due to privacy or security concerns, were introduced into the core of the
179
204
spec as legitimate inputs outside of extensions, or never received support from browsers or authenticators.
0 commit comments