Fido2Server class

WebAuthn server ceremonies. Callers must store challenges server-side, bind them to the user/session, expire them, and atomically consume them once. Registration verifies none/packed attestation and the credential public key. Certificate trust is delegated to Fido2Config.attestationVerifier.

Constructors

Fido2Server(Fido2Config config)

Properties

config → Fido2Config
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

authenticateBegin({List<RegisteredCredential> credentials = const [], List<int>? challenge}) → Map<String, dynamic>
authenticateComplete(Map<String, dynamic> assertion, {required RegisteredCredential credential, required List<int> expectedChallenge, List<int>? expectedUserHandle, bool requireUserHandle = false}) → int
Returns the new sign counter after successful assertion verification.
authenticateCompleteResult(Map<String, dynamic> assertion, {required RegisteredCredential credential, required List<int> expectedChallenge, List<int>? expectedUserHandle, bool requireUserHandle = false}) → AuthenticationResult
Persist both fields only after this method succeeds. BS may change in either direction. For usernameless login, require a returned user handle and resolve the credential and expected handle from the same account.
completeRegistration(String clientDataBase64, String attestationObjectBase64, String expectedChallenge, {List<int>? offeredAlgorithms, List<int>? userHandle}) → RegistrationResult
completeVerification(String clientDataBase64, String authenticatorDataBase64, String signatureBase64, String expectedChallenge, CborMap credentialPublicKeyCbor, int storedSignCount, {String? userHandle, List<int>? expectedUserHandle, bool requireUserHandle = false, bool? storedBackupEligible}) → Future<VerificationResult>
Verifies an assertion and reports failures through the returned Future.
generateRegistrationOptions(String username, String displayName, {List<int>? userHandle}) → Map<String, dynamic>
generateVerificationOptions() → Map<String, dynamic>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerBegin(PublicKeyCredentialUserEntity user, {List<int>? challenge}) → RegistrationRequest
Creates options with a 1-64 byte user ID and non-null user names.
registerComplete(Map<String, dynamic> credential, {required List<int> expectedChallenge, List<int>? offeredAlgorithms, List<int>? userHandle}) → RegisteredCredential
Completes registration using the saved request's offeredAlgorithms and account ID (userHandle). Returns the credential and initial backup state.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited