HTTP API Toolkit HTTP API Toolkit
HTTP API Toolkit HTTP API Toolkit
DocFX + Singulink = ♥

Search Results for

    Class PasskeyService

    Runs WebAuthn passkey ceremonies: signing in, verifying the signed-in user and registering new passkeys. Each ceremony is started by a begin method, whose options the client passes to the browser, and finished by a finish method with the credential the browser returned.

    Inheritance
    object
    PasskeyService
    Namespace: Singulink.Net.Http.Api.Service.Passkeys
    Assembly: Singulink.Net.Http.Api.Service.Passkeys.dll
    Syntax
    public sealed class PasskeyService
    Remarks

    Passkeys are stored by the app and accessed through its IPasskeyStore. Ceremony state is kept in the registered IShortLivedStore between the begin and finish requests, so a ceremony can be finished on any server that shares the store.

    Ceremonies can be finished once. Failures are reported with ApiException types that carry one of the PasskeyErrorCodes, or CodeChallengeInvalid for a sign-in or registration that begins without a valid code challenge.

    The passkey of a sign-in authenticates the request, so a sign-in whose passkey check fails is refused with an UnauthorizedApiException (401). Verifications and registrations run in a signed-in session that authenticates their requests, so a failed passkey check there is reported with a ValidationApiException (422) and the same error codes. A verification of a user without passkeys and a registration of a passkey that is already registered conflict with the current state and are reported with a ConflictApiException (409).

    Methods

    Name Description
    BeginRegistrationAsync(PasskeyUser, string?, bool, CancellationToken)

    Starts creating a passkey for a user.

    BeginSignInAsync(string?, string?, CancellationToken)

    Starts a sign-in.

    BeginVerificationAsync(ISessionToken, CancellationToken)

    Starts a verification of the signed-in user with one of their passkeys, to confirm it is them before a sensitive action.

    BeginVerificationAsync(string, CancellationToken)

    Starts a verification of the signed-in user with one of their passkeys, to confirm it is them before a sensitive action.

    FinishRegistrationAsync(ISessionToken, string, string, string?, CancellationToken)

    Finishes creating a passkey for the signed-in user: verifies the new credential and returns its data, which the app then stores. The passkey is not stored by this method.

    FinishRegistrationAsync(string, string, string, string?, CancellationToken)

    Finishes creating a passkey: verifies the new credential and returns its data, which the app then stores. The passkey is not stored by this method.

    FinishSignInAsync(string, string, string?, CancellationToken)

    Finishes a sign-in: verifies the credential, saves the values the passkey reported through UpdateAsync(PasskeyRecord, DateTime, CancellationToken), and returns the passkey and its user. The app then signs the user in, or creates a sign-in code bound to CodeChallenge for the client to redeem.

    FinishVerificationAsync(ISessionToken, string, string, CancellationToken)

    Finishes a verification of the signed-in user: verifies that the credential is from one of their passkeys and saves the values the passkey reported through UpdateAsync(PasskeyRecord, DateTime, CancellationToken).

    FinishVerificationAsync(string, string, string, CancellationToken)

    Finishes a verification of the signed-in user: verifies that the credential is from one of their passkeys and saves the values the passkey reported through UpdateAsync(PasskeyRecord, DateTime, CancellationToken).

    © Singulink. All rights reserved.