This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ssr.js | |
// ... | |
const AUTH = { | |
username: 'storefront', | |
password: 'password' | |
} | |
function basicAuthMiddleware(req, res, next) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "fbba8172-d84a-42bd-ae58-4cb5a4ce2e34", | |
"name": "OCAPI: Session Bridge", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | |
"_exporter_id": "976887" | |
}, | |
"item": [ | |
{ | |
"name": "1. Get OAuth2 client token", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "05d3aa62-f282-43f6-ad9c-3149f2da531a", | |
"name": "JWT oAuth Example", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | |
"_exporter_id": "976887" | |
}, | |
"item": [ | |
{ | |
"name": "1. Download JS for Postman", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A wrapper around a standard array supported by Salesforce Commerce Cloud B2C | |
* to circumvent the 20.000 items quota limitation. | |
* | |
* WARNING: As this circumvents the quota limitation, you are open to high | |
* resource usage and possibly out of memory exceptions. | |
*/ | |
function UnlimitedArray() { | |
const listContainer = new Array(); | |
listContainer.push(new Array()); |