Methods
(static) fetch(data, opts) → {Promise.<(object|string)>}
- Description:
Delegate the proof request to the correct fetcher. This method uses the current environment (browser/node), certain values from the
data
parameter and the proxy policy set in theopts
parameter to choose the right approach to fetch the proof. An error will be thrown if no approach is possible.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
data |
ServiceProvider | Data from a claim definition |
opts |
module:types~VerificationConfig | Options to enable the request |
Returns:
Fetched proof data
- Type
- Promise.<(object|string)>
(inner) createDefaultRequestPromise(data, opts) → {Promise.<(object|string)>}
Parameters:
Name | Type | Description |
---|---|---|
data |
ServiceProvider | Data from a claim definition |
opts |
object | Options to enable the request |
Returns:
Fetched proof data
- Type
- Promise.<(object|string)>
(inner) createFallbackRequestPromise(data, opts) → {Promise.<(object|string)>}
Parameters:
Name | Type | Description |
---|---|---|
data |
ServiceProvider | Data from a claim definition |
opts |
object | Options to enable the request |
Returns:
Fetched proof data
- Type
- Promise.<(object|string)>
(inner) createProxyRequestPromise(data, opts) → {Promise.<(object|string)>}
Parameters:
Name | Type | Description |
---|---|---|
data |
ServiceProvider | Data from a claim definition |
opts |
object | Options to enable the request |
Returns:
Fetched proof data
- Type
- Promise.<(object|string)>
(inner) handleBrowserRequests(data, opts) → {Promise.<(object|string)>}
Parameters:
Name | Type | Description |
---|---|---|
data |
ServiceProvider | Data from a claim definition |
opts |
object | Options to enable the request |
Returns:
Fetched proof data
- Type
- Promise.<(object|string)>
(inner) handleNodeRequests(data, opts) → {Promise.<(object|string)>}
Parameters:
Name | Type | Description |
---|---|---|
data |
ServiceProvider | Data from a claim definition |
opts |
object | Options to enable the request |
Returns:
Fetched proof data
- Type
- Promise.<(object|string)>