UNPKG

ltijs

Version:

Easily turn your web application into a LTI 1.3 Learning Tool.

28 lines • 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildPlatform = buildPlatform; const freeze_1 = require("#utils/objects/freeze"); function buildPlatform(record) { return (0, freeze_1.deepFreeze)({ id: record.id, url: record.url, clientId: record.clientId, name: record.name, authenticationEndpoint: record.authenticationEndpoint, accessTokenEndpoint: record.accessTokenEndpoint, accesstokenEndpoint: record.accessTokenEndpoint, authorizationServer: resolveAuthorizationServer(record.authorizationServer, record.accessTokenEndpoint), idTokenValidation: record.idTokenValidation, authConfig: record.idTokenValidation, active: record.active, keys: record.keys, publicKey: record.keys.public, privateKey: record.keys.private, }); } function resolveAuthorizationServer(authorizationServer, accessTokenEndpoint) { if (authorizationServer !== undefined && authorizationServer !== '') return authorizationServer; return accessTokenEndpoint; } //# sourceMappingURL=platform.serializer.js.map