UserRegistrationConfigView.js revision 604549e06a284a3959b909a550eea36d13e70655
/**
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
*/
/*global define */
"jquery",
"lodash",
], function($, _, AbstractSelfServiceView, ConfigDelegate) {
]),
model: {
surpressSave: false,
uiConfigurationParameter: "selfRegistration",
serviceType: "user",
msgType: "selfServiceUserRegistration",
"configDefault": {
"stageConfigs" : [
{
"name" : "captcha",
"recaptchaSiteKey": "",
"recaptchaSecretKey": "",
"recaptchaUri" : "https://www.google.com/recaptcha/api/siteverify"
},
{
"name" : "emailValidation",
"identityEmailField" : "mail",
"from" : "info@admin.org",
"subject" : "Register new account",
"subjectTranslations" : {
"en" : "Register new account",
"fr" : "Créer un nouveau compte"
},
"messageTranslations" : {
"en" : "<h3>This is your registration email.</h3><h4><a href=\"%link%\">Email verification link</a></h4>",
"fr" : "<h3>Ceci est votre mail d'inscription.</h3><h4><a href=\"%link%\">Lien de vérification email</a></h4>"
},
"verificationLinkToken" : "%link%",
"verificationLink" : "https://localhost:8443/#register/"
},
{
"name" : "userDetails",
"identityEmailField" : "mail"
},
{
"name" : "kbaSecurityAnswerDefinitionStage",
"numberOfAnswersUserMustSet": 1,
"kbaConfig" : null
},
{
"name" : "selfRegistration",
}
],
"snapshotToken" : {
"type" : "jwt",
"sharedKey" : "!tHiSsOmEsHaReDkEy!",
"keyPairAlgorithm" : "RSA",
"keyPairSize" : 1024,
"jweAlgorithm" : "RSAES_PKCS1_V1_5",
"encryptionMethod" : "A128CBC_HS256",
"jwsAlgorithm" : "HS256",
"tokenExpiry" : 1800
},
"storage" : "stateless"
},
"saveConfig": {}
},
this.data.configList = [{
type: "captcha",
title: $.t("templates.selfservice.user.captchaTitle"),
help: $.t("templates.selfservice.captcha.description"),
editable: true,
enabledByDefault: false
},
{
type: "emailValidation",
title: $.t("templates.selfservice.emailValidation"),
help: $.t("templates.selfservice.emailValidationDescription"),
editable: true,
enabledByDefault: true
},
{
type: "userDetails",
title: $.t("templates.selfservice.userDetailsTitle"),
help: $.t("templates.selfservice.userDetailsHelp"),
editable: true,
enabledByDefault: true
},
{
type: "kbaSecurityAnswerDefinitionStage",
title: $.t("templates.selfservice.kbaSecurityAnswerDefinitionStageTitle"),
help: $.t("templates.selfservice.kbaSecurityAnswerDefinitionStageHelp"),
editable: false,
enabledByDefault: true
},
{
type: "selfRegistration",
title: $.t("templates.selfservice.registrationForm"),
help: $.t("templates.selfservice.registrationFormDescription"),
editable: true,
enabledByDefault: true
}];
},
saveConfig: function () {
});
}
}, this));
}
});
return new UserRegistrationConfigView();
});