PasskeyIdentity
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
The identity of a user signed in through Passkey. Derives from ClaimsIdentity, so it satisfies IIdentity and reports IsAuthenticated as true because its authentication type, "Passkey", is never empty — which is exactly what IsAuthenticated reads.
4.2.0+- C#
- VB.NET
public class PasskeyIdentity : ClaimsIdentity
Public Class PasskeyIdentity
Inherits ClaimsIdentity
WebAuthn proves control of a credential bound to an opaque account and nothing more, so the component builds the minimum: a NameIdentifier claim and a Name claim, both equal to UserId, with the ClaimsIdentity default name and role claim types. A Authenticating handler adds the application's own claims and roles, or replaces the principal.
No key, no challenge and no reference to the component is a member of this class. It can be assigned to User, bound or handed to another layer; on .NET 8 the same principal can be handed to ASP.NET Core cookie sign-in unchanged. CredentialId is a privacy-sensitive identifier (see PasskeyCredential): do not log or serialize the identity wholesale; an audit line should carry at most a short prefix of the credential id.
Properties
AuthenticatedAt
DateTimeOffset: Returns when this identity was created, in UTC.
CredentialId
Byte[]: Returns the id of the credential that signed the user in. Identifies which of the account's passkeys was used. Not a secret, but a stable privacy-sensitive identifier: do not log it in full.
UserId
String: Returns the application user id the passkey is bound to. Also present as the NameIdentifier claim.
UserVerified
Boolean: Returns whether the authenticator verified the user — PIN, fingerprint, face, device unlock — in the ceremony that produced this identity, with a credential whose user verification was established when it was registered (UserVerified). Always true when UserVerification is Required; with any other setting a false here means presence was confirmed but the person was not verified, or was verified by a credential registered without verification, whose UV flag WebAuthn does not let the application rely on. The application decides what that is worth.