Skip to content

Commit 489bf7c

Browse files
committed
Make AuthenticatorDetails.AaGuid nullable
Return null instead of Guid.Empty when the Win32 API does not provide a valid 16-byte authenticator identifier, so the absence of an AAGUID is represented distinctly rather than as an all-zero GUID.
1 parent c519897 commit 489bf7c

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Documentation/API/DSInternals.Win32.WebAuthn.AuthenticatorDetails.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ Corresponds to WEBAUTHN_AUTHENTICATOR_DETAILS.
3434
The Authenticator Attestation GUID (AAGUID) identifying the model of the authenticator.
3535

3636
```csharp
37-
public Guid AaGuid { get; set; }
37+
public Guid? AaGuid { get; set; }
3838
```
3939

4040
#### Property Value
4141

42-
[Guid](https://learn.microsoft.com/dotnet/api/system.guid)
42+
[Guid](https://learn.microsoft.com/dotnet/api/system.guid)?
4343
4444
### <a id="DSInternals_Win32_WebAuthn_AuthenticatorDetails_AuthenticatorLogo"></a> AuthenticatorLogo
4545

Documentation/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file. The format
1010

1111
### Changed
1212

13-
- The `AuthenticatorDetails.AuthenticatorId` property (returned by `Get-PasskeyAuthenticator`) was renamed to `AaGuid` and its type changed from `byte[]` to `Guid`. The binary identifier returned by the Win32 API is a big-endian encoded Authenticator Attestation GUID (AAGUID), so it is now decoded and surfaced as a `Guid` instead of a Base64Url-encoded string.
13+
- The `AuthenticatorDetails.AuthenticatorId` property (returned by `Get-PasskeyAuthenticator`) was renamed to `AaGuid` and its type changed from `byte[]` to `Guid?`. The binary identifier returned by the Win32 API is a big-endian encoded Authenticator Attestation GUID (AAGUID), so it is now decoded and surfaced as a `Guid` (or `null` when absent) instead of a Base64Url-encoded string.
1414

1515
## [3.1.0] - 2026-05-14
1616

Src/DSInternals.Win32.WebAuthn/AuthenticatorDetails.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public sealed class AuthenticatorDetails
1111
/// <summary>
1212
/// The Authenticator Attestation GUID (AAGUID) identifying the model of the authenticator.
1313
/// </summary>
14-
public Guid AaGuid { get; set; }
14+
public Guid? AaGuid { get; set; }
1515

1616
/// <summary>
1717
/// The authenticator name.

Src/DSInternals.Win32.WebAuthn/Interop/ApiHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ public static UserInformation Translate(UserInformationOut userInfo)
266266
/// <summary>
267267
/// Decodes the authenticator identifier returned by the Win32 API, which is the AAGUID encoded as a big-endian GUID.
268268
/// </summary>
269-
private static Guid DecodeAaGuid(byte[]? authenticatorId)
269+
private static Guid? DecodeAaGuid(byte[]? authenticatorId)
270270
{
271271
// The AAGUID is always a 16-byte big-endian encoded GUID.
272272
return authenticatorId is { Length: 16 }
273273
? Guid.Create(authenticatorId, bigEndian: true)
274-
: Guid.Empty;
274+
: null;
275275
}
276276

277277
/// <summary>

0 commit comments

Comments
 (0)