Validate a device
- Requests a one-time challenge from the server
- Generates or retrieves an attestation key via Apple’s App Attest
- Creates an attestation object on-device
- Sends it to the Grantiva server for validation
- Returns a signed JWT with device intelligence
AttestationResult
DeviceIntelligence
Token caching
The SDK automatically caches valid tokens. CallingvalidateAttestation() multiple times reuses the cached token until it expires, then performs a fresh attestation.
Refresh tokens
Check if the current token is still valid, and refresh if expired:nil if no token has been stored yet (call validateAttestation() first).
Check token status
Clear stored data
Force a fresh attestation on the next call:Use the token
Send the JWT to your backend as a Bearer token:- Device risk score
- Jailbreak detection status
- Device model and OS version
- Custom claims configured in the dashboard