UNPKG

mpp-sdk

Version:

SDK to talk to the Memento Payments Platform

27 lines (26 loc) 779 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InMemoryStorage = void 0; const tslib_1 = require("tslib"); class InMemoryStorage { constructor(authToken) { this.authToken = null; this.authToken = authToken || null; } storeAuthToken(authToken) { return tslib_1.__awaiter(this, void 0, void 0, function* () { this.authToken = authToken; }); } clearAuthToken() { return tslib_1.__awaiter(this, void 0, void 0, function* () { this.authToken = null; }); } retrieveAuthToken() { return tslib_1.__awaiter(this, void 0, void 0, function* () { return this.authToken; }); } } exports.InMemoryStorage = InMemoryStorage;