architect-sdk
Version:
Essentialz Architect SDK
39 lines (38 loc) • 1.71 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppleProvider = void 0;
var BaseProvider_1 = require("./BaseProvider");
var types_1 = require("../types");
var ArchitectError_1 = require("../../errors/ArchitectError");
var AppleProvider = /** @class */ (function (_super) {
__extends(AppleProvider, _super);
function AppleProvider(httpClient) {
return _super.call(this, types_1.ArchitectAuthProvider.Apple, httpClient) || this;
}
AppleProvider.prototype.validateCredentials = function (credentials) {
var identityToken = credentials.identityToken;
if (!identityToken
|| !identityToken.length) {
throw new ArchitectError_1.ArchitectError(this.formatErrorMessage(credentials, {
identityToken: 'string',
}));
}
};
return AppleProvider;
}(BaseProvider_1.BaseProvider));
exports.AppleProvider = AppleProvider;