@maccuaa/intellitrust-issuance-sdk
Version:
JavaScript client for @maccuaa/intellitrust-issuance-sdk
45 lines (43 loc) • 1.23 kB
JavaScript
;
/**
* Entrust Identity as a Service Issuance API
* 5.42
* Contact: support@entrust.com
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Configuration = void 0;
class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey;
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath;
constructor(param = {}) {
this.apiKey = param.apiKey;
this.basePath = param.basePath;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
static isJsonMime(mime) {
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
}
exports.Configuration = Configuration;