public async getVerifiedSecureLocation(priority: trustedAppService.LocatingPriority): Promise<string> {
try {
await this.initSecureLocationAttestContext();
const secureLocation = await trustedAppService.getCurrentSecureLocation(this.timeout, priority);
/**
* The best practice is to complete the secure location verification on the server.
* The reference code is provided here.
*/
await this.verifySecureLocation(secureLocation);
return JSON.stringify(secureLocation.originalLocation);
} catch (err) {
throw new Error((err as BusinessError).message);
}
}