1 | import { SecurityCheck, SecurityCheckResult } from "./deviceTrust";
|
2 | import { SecurityCheckResultMetric } from "./metrics";
|
3 | /**
|
4 | * Service module for handling performing and reporting possible security
|
5 | * issues in a mobile application.
|
6 | *
|
7 | * This requires the @aerogear/cordova-plugin-aerogear-security plugin to be
|
8 | * included in an application.
|
9 | */
|
10 | export declare class SecurityService {
|
11 | private static readonly METRICS_KEY;
|
12 | /**
|
13 | * Execute the provided security check and return the result.
|
14 | *
|
15 | * @returns The result of the provided check.
|
16 | */
|
17 | check(check: SecurityCheck): Promise<SecurityCheckResult>;
|
18 | /**
|
19 | * Execute the provided security check and publish the result as a metric.
|
20 | *
|
21 | * @return The sent metric for the check result.
|
22 | */
|
23 | checkAndPublishMetric(check: SecurityCheck): Promise<SecurityCheckResultMetric>;
|
24 | /**
|
25 | * Execute the provided security checks and return the results in an array.
|
26 | *
|
27 | * @returns An array of results for the provided checks.
|
28 | */
|
29 | checkMany(...checks: SecurityCheck[]): Promise<SecurityCheckResult[]>;
|
30 | /**
|
31 | * Execute the provided security checks and publish the results as metrics.
|
32 | *
|
33 | * @return An array of the sent metrics.
|
34 | */
|
35 | checkManyAndPublishMetric(...checks: SecurityCheck[]): Promise<SecurityCheckResultMetric[]>;
|
36 | /**
|
37 | * Publish metrics results from self defence checks to a metrics service.
|
38 | * Application configuration must be provided to the security service on
|
39 | * creation, otherwise metrics sending will always fail.
|
40 | *
|
41 | * @return Promise with the result of the underlying metrics publisher.
|
42 | */
|
43 | private publishCheckResultMetrics;
|
44 | }
|