Skip to main content
The RadarVerifiedLocationToken class represents a user’s verified location, including fraud detection results and a signed JWT token that can be verified server-side.
Verify the token server-side using your secret key for secure location verification.

Properties

user
RadarUser
The user associated with this verified location token.
events
RadarEvent[]
An array of events associated with the verified location.
token
String
A signed JSON Web Token (JWT) containing the user and array of events. Verify the token server-side using your secret key.
expiresAt
Date
The datetime when the token expires.
expiresIn
TimeInterval
The number of seconds until the token expires.
passed
Bool
A boolean indicating whether the user passed all jurisdiction and fraud detection checks.
failureReasons
String[]
An array of failure reasons for jurisdiction and fraud detection checks.
_id
String
The Radar ID of the location check.
fullDict
Dictionary
The full dictionary value of the token.

Methods

dictionaryValue

Returns a dictionary representation of the verified location token.
func dictionaryValue() -> [AnyHashable : Any]
- (NSDictionary *_Nonnull)dictionaryValue;
Returns: A dictionary containing all token properties.

Example

// Implement RadarVerifiedDelegate to receive tokens
func didUpdateToken(_ token: RadarVerifiedLocationToken) {
    if token.passed {
        // User passed all fraud checks
        if let jwtToken = token.token {
            // Send token to your server for verification
            verifyTokenOnServer(jwtToken)
        }
    } else {
        // User failed fraud checks
        if let reasons = token.failureReasons {
            print("Failed reasons: \(reasons)")
        }
    }
}
// Implement RadarVerifiedDelegate to receive tokens
- (void)didUpdateToken:(RadarVerifiedLocationToken *)token {
    if (token.passed) {
        // User passed all fraud checks
        if (token.token) {
            // Send token to your server for verification
            [self verifyTokenOnServer:token.token];
        }
    } else {
        // User failed fraud checks
        if (token.failureReasons) {
            NSLog(@"Failed reasons: %@", token.failureReasons);
        }
    }
}

See Also