Attestation class
Provides device attestation functionality for iOS and Android platforms.
The Attestation class handles platform-specific device verification to ensure that API requests are coming from legitimate, unmodified applications. This is a core security feature that prevents unauthorized access and API abuse.
Platform Support
- iOS: Uses Apple's App Attestation service to verify app integrity
- Android: Uses Google Play Integrity API to verify app and device integrity
Security Benefits
- Verifies that the app hasn't been tampered with or modified
- Confirms the app is running on a legitimate device
- Prevents API access from emulators, rooted devices, or modified apps
- Eliminates the need for traditional API keys
Usage
Attestation is handled automatically by the SDK and typically doesn't require direct interaction from application code.
// Attestation happens automatically during authentication
final user = await calljmp.users.auth.email.authenticate(
email: 'user@example.com',
password: 'password',
policy: UserAuthenticationPolicy.signInOrCreate,
);
Constructors
- Attestation({String? keyId, int? cloudProjectNumber})
- Creates a new Attestation instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
attest(
dynamic data) → Future< Object> - Performs device attestation with the provided data.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited