biometric_shield library
BiometricShield — A composable Flutter SDK for biometric authentication.
Core package for biometric authentication. Pure Dart business logic without Flutter widget dependencies.
For Flutter UI widgets, import biometric_shield_ui separately.
Classes
- BiometricCancelled
- User explicitly cancelled authentication.
- BiometricCapability
- Rich capability model describing what biometric features are available on the current device.
- BiometricConfig
- Configuration object for the BiometricShield SDK.
- BiometricError
- An unexpected platform error occurred.
- BiometricEvent
- An audit event emitted by the BiometricShield SDK.
- BiometricFallbackSuccess
- Biometric failed but a fallback succeeded.
- BiometricInvalidated
- Biometric keys were invalidated (new fingerprint enrolled etc).
- BiometricLockedOut
- Max attempts exceeded. User is locked out.
- BiometricPolicy
- Server-driven policy overrides.
- BiometricPreferences
- User-facing biometric preferences that can be changed at runtime.
- BiometricReauthenticationRequired
- Token refresh failed and the user must re-authenticate from scratch.
- BiometricResult
- Sealed result type for all biometric authentication outcomes.
- BiometricSession
- Represents an active biometric authentication session.
- BiometricSessionValid
- Active session was found — no prompt shown.
- BiometricShield
- Main entry point for the BiometricShield SDK.
- BiometricShieldInterface
- Contract for BiometricShield that enables proper dependency injection and mock substitution in tests.
- BiometricShieldMockBase
- Base class for mock implementations used in testing.
- BiometricSuccess
- Biometric auth succeeded. Session is now active.
- BiometricTokenExpired
- Auth succeeded but token was expired or missing.
- Biometric is not available or not enrolled on this device.
- FallbackHandler
- Interface for handling fallback authentication UI.
- LockoutState
- Represents the current lockout state for a user.
- PolicyProvider
- Interface for server-driven policy enforcement.
- TokenLifecycle
- Interface for backend-agnostic token lifecycle management.
- TokenRefreshFailed
- Refresh failed due to a transient error.
- TokenRefreshReauthRequired
- The refresh token itself is expired; full re-auth needed.
- TokenRefreshResult
- Result of a token refresh attempt.
- TokenRefreshSuccess
- Refresh succeeded.
- TokenStoreInterface
- Interface for custom secure token storage.
Enums
- BiometricAuthMethod
- The authentication method used to establish a session.
- BiometricEventType
- All event types emitted by the BiometricShield SDK.
- BiometricFallback
- Available fallback authentication methods when biometric auth fails or is unavailable.
- Reason why biometric authentication is unavailable on this device.
- FallbackResult
- Result of a fallback attempt.
- TokenStatus
- Status of a stored token after validation.