mongodb-stitch
Version:
[](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
72 lines • 2.43 kB
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ProviderConfigCodec = (function () {
function ProviderConfigCodec() {
}
ProviderConfigCodec.prototype.decode = function (from) {
return {
config: from.config,
type: from.type
};
};
ProviderConfigCodec.prototype.encode = function (from) {
return {
config: from.config,
type: from.type
};
};
return ProviderConfigCodec;
}());
exports.ProviderConfigCodec = ProviderConfigCodec;
var Anon = (function () {
function Anon() {
this.type = "anon-user";
}
return Anon;
}());
exports.Anon = Anon;
var ApiKey = (function () {
function ApiKey() {
}
return ApiKey;
}());
exports.ApiKey = ApiKey;
var Userpass = (function () {
function Userpass(emailConfirmationUrl, resetPasswordUrl, confirmEmailSubject, resetPasswordSubject) {
this.emailConfirmationUrl = emailConfirmationUrl;
this.resetPasswordUrl = resetPasswordUrl;
this.confirmEmailSubject = confirmEmailSubject;
this.resetPasswordSubject = resetPasswordSubject;
this.type = "local-userpass";
this.config = {
confirmEmailSubject: this.confirmEmailSubject,
emailConfirmationUrl: this.emailConfirmationUrl,
resetPasswordSubject: this.resetPasswordSubject,
resetPasswordUrl: this.resetPasswordUrl
};
}
return Userpass;
}());
exports.Userpass = Userpass;
var Custom = (function () {
function Custom(signingKey) {
this.signingKey = signingKey;
this.type = "custom-token";
this.config = {
signingKey: this.signingKey
};
}
return Custom;
}());
exports.Custom = Custom;
});
//# sourceMappingURL=ProviderConfigs.js.map