Constructs a new instance of the Certificate class.
The options used to configure the certificate.
Protected
_A reference to the parent property, if any. This allows for hierarchical
relationships between properties. If no parent exists, the value will be undefined
.
Optional
certOptional property representing a certificate source reference. This can be used to specify the source of a certificate, such as a file path or other reference, for use in secure connections.
Protected
Optional
descriptionAn optional description providing additional details or context.
Optional
disabledIndicates whether the property is disabled.
When set to true
, the property is considered inactive or unavailable.
A unique identifier represented as a string.
Optional
keyAn optional property representing a reference to a source for the key. This can be used to specify the location or content of a key, such as a private key for SSL/TLS certificates.
Optional
matchesAn optional list of URL match patterns used to determine if a certificate should be applied to a specific request. Each pattern in the list is evaluated against the request URL to check for a match.
Optional
nameAn optional property representing the name of the certificate. This can be used to identify or label the certificate.
Optional
passphraseAn optional passphrase used to access the private key of a certificate.
Optional
pfxOptional reference to a PFX or PKCS12 certificate.
Static
_Determines whether the current certificate can be applied to the given URL.
The URL to check against the certificate's match pattern.
A boolean indicating whether the certificate matches the URL.
Sets the description and type name for the current object.
The description content to be assigned.
The type name to categorize the object.
Traverses up the parent hierarchy to find an ancestor that contains the specified property. Optionally, a customizer function can be provided to determine if the ancestor should be returned.
The name of the property to search for in the ancestors.
Optional
customizer: (ancester: PropertyBase) => booleanAn optional function that takes an ancestor as input and returns a boolean. If provided, the traversal continues until the customizer returns a truthy value. If not provided, the traversal stops at the first ancestor that contains the property.
The first ancestor that satisfies the search criteria, or undefined
if no such ancestor is found.
Iterates through the parent hierarchy of the current object, starting from its immediate parent.
The iteration continues until the provided iterator function returns false
or there are no more parents.
Options to control the iteration behavior.
withRoot
(optional): A flag to include the root object in the iteration.A callback function that is invoked for each parent object in the hierarchy.
false
, the iteration stops.An array of cloned parent objects that were iterated over.
Retrieves metadata associated with the current context. Currently it returns an empty object as no metadata keys is defined.
An object representing the metadata.
Retrieves the parent object associated with the current instance.
The parent object of the current instance.
Converts the current object instance into a JSON-serializable representation.
A plain object containing the filtered properties of the current instance, suitable for JSON serialization.
Converts the current instance to a plain JavaScript object.
This method internally calls toJSON()
to perform the conversion.
A plain JavaScript object representation of the instance.
Converts the current object to a JSON string representation.
A JSON string representation of the object.
Updates the certificate properties with the provided options.
An object containing the certificate options to update.
Static
isDetermines if the given object is a Certificate.
The object to check.
A boolean indicating whether the object is a Certificate.
Static
propertyDetermines if a given property key is considered a "meta" property.
In the context of Insomnia, meta properties are defined as those
that start with an underscore (_
). The underscore character itself
is also rejected as a valid meta property key.
The value associated with the property (currently unused in this method).
The property key to evaluate.
true
if the key starts with an underscore (_
), otherwise false
.
Static
propertyRemoves the leading underscore ('_') from the beginning of a given property key.
The value associated with the property (unused in this method).
The property key to process.
The property key without the leading underscore.
Static
replaceReplaces placeholders in the given content string with values from the provided variables. The placeholders are resolved using an interpolation mechanism, and the variables are merged in reverse order to determine the final context for substitution.
The string containing placeholders to be replaced.
A list of objects containing key-value pairs for substitution. The objects are merged in reverse order to form the final context.
The content string with placeholders replaced by corresponding values from the context.
Static
replaceReplaces substitutions in the given object using the provided variables.
This method takes an object and a list of variable objects, and replaces placeholders in the object with corresponding values from the variables. The variables are merged in reverse order, meaning the last variable in the list has the highest priority.
The object containing placeholders to be replaced.
A list of objects containing substitution values.
A new object with substitutions replaced.
Represents a Certificate object that can be used to manage SSL/TLS certificates and their associated properties. This class provides functionality for defining certificate details, matching URL patterns, and determining applicability to specific requests.