Skip to main content
Version: 4.2

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+
public class PasskeyIdentity : 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​

Instance member AuthenticatedAt​

DateTimeOffset: Returns when this identity was created, in UTC.

Instance member 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.

Instance member UserId​

String: Returns the application user id the passkey is bound to. Also present as the NameIdentifier claim.

Instance member 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.