virgil-sdk
Version:
Virgil Security Services SDK
47 lines (46 loc) • 1.54 kB
TypeScript
/**
* Class responsible for tracking which Virgil SDK is being used to make requests, its version,
* browser and platform.
*/
export declare class VirgilAgent {
value: string;
private userAgent;
/**
* Returns navigator.userAgent string or '' if it's not defined.
* @return {string} user agent string
*/
private getUserAgent;
/**
* Initializes a new instance of `VirgilAgent`.
* @param {string} product - name of product eg (sdk, brainkey, bpp, keyknox, ratchet, e3kit, purekit)
* argument of request methods.
* @param {string} version - version of the product.
* @param {string} [userAgent] - string with device user agent. Optional
*/
constructor(product: string, version: string, userAgent?: string);
/**
* Detects device OS
* @returns {string} returns OS if detected or 'other'.
*/
getOsName(): string;
/**
* Detects device browser
* @returns {string} returns browser if detected of 'other'.
*/
getBrowser(): string;
/**
* Detect React Native.
* @return {boolean} true if detects ReactNative .
*/
private isReactNative;
/**
* Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.
* @return {boolean} true if detects Ionic.
*/
private isIonic;
/**
* Return information for `virgil-agent` header.
* @return {string} string in format: PRODUCT;FAMILY;PLATFORM;VERSION
*/
private getHeaderValue;
}