Skip to content

Commit 0e1072a

Browse files
committed
Add documentation for getJwtForSite
1 parent 32522cd commit 0e1072a

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

source/includes/_utilities.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,26 @@ This fetches a JavaScript object of your integration's configuration for the cur
7070

7171
This fetches the <a href="#dealership-info-event">Dealership Info Event object</a> for the current website.
7272

73+
## API.utils.getJwtForSite()
74+
75+
> Usage:
76+
77+
```javascript
78+
(function(WIAPI) {
79+
var API = new WIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
80+
API.utils.getJwtForSite().then(function(jwtObject) {
81+
API.log(jwtObject);
82+
// Returns a data structure like this:
83+
// {
84+
// jwt: "eyJraWQiOiIya0k0XzIyZoLUUi...KpSUf6vJ8b9Z1NDRcIgv0GrZoiqPhTunw" // String
85+
// }
86+
});
87+
})(window.DDC.API);
88+
```
89+
90+
This fetches an object containing a Java Web Token which can be used to secure/verify the request from our site to your service. This tool offers the capability for you to validate that the request for content from your service originated from our platform and enables you to determine whether or not the content should be served. For more details regarding how to use this with your service, please refer to the <a href="#jwt-usage-documentation">JWT usage documentation</a>.
91+
92+
7393
## API.utils.getJwtForVehicles()
7494

7595
> Usage:
@@ -88,7 +108,7 @@ This fetches the <a href="#dealership-info-event">Dealership Info Event object</
88108
})(window.DDC.API);
89109
```
90110

91-
This fetches an object containing the array of VINs on the current page and a corresponding Java Web Token which can be used to secure/verify the request from our site to your service. This tool offers the capability for you to validate that the request for content from your service originated from our platform and enables you to determine whether or not the content should be served up. For more details regarding how to use this with your service, please refer to the <a href="#jwt-usage-documentation">JWT usage documentation</a>.
111+
This fetches an object containing the array of VINs on the current page and a corresponding Java Web Token which can be used to secure/verify the request from our site to your service. This tool offers the capability for you to validate that the request for content from your service originated from our platform and enables you to determine whether or not the content should be served. For more details regarding how to use this with your service, please refer to the <a href="#jwt-usage-documentation">JWT usage documentation</a>.
92112

93113
## API.utils.getPageData()
94114

0 commit comments

Comments
 (0)