Introduction
In the services config of your application, add an object for the urac service and add a mail object that might be needed by all services.
...
Provisioning is a configuration that all SOAJS micro-services can acquire once you turn on multi-tenant for them.
Once a service becomes multi-tenant, you can provide custom tenant configuration to it at run time.
If you have 2 tenants that can access the URAC, then the provisioned configuration for each tenant will be loaded once that tenant invokes an API of URAC.
The below configuration is supported by the URAC micro-service and can be configured & changed at the tenant level under the Manage Pillar.
Configuration Details
...
Field Name | Type | Mandatory | Description |
---|---|---|---|
hashIterations | Number | Hashing Iteration value used by SOAJS hasher to encrypt/compare passwords | |
seedLength | Number | Seed Length value used by SOAJS hasher to encrypt/compare passwords | |
link | Object | Link values that are attached in the content of email notifications | |
tokenExpiryTTL | Number | token expiry limit in seconds | |
validateJoin | Boolean | Set to true if registration needs validation confirmation | |
Object | Object to configure the mail notifications content. Each type of notification is an entry in this object where you can configure a custom mail subject, link it to a template or inject html content directly. | ||
passportLogin | Object | Define application keys for passport integration. Currently supporting: Twitter - Facebook - Google |
Configuration Sample
...
The below configuration shows 2 objects inside the tenant configuration: URAC - Mail.
The URAC object is explained in the table above.
The mail configuration contains 2 fields; from & transport where from is the sender's email address and transport is the exposed out of the box configuration used by nodemailer.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "commonFields": { "mail": { "from": 'me@localhost.com', "transport": { "type": "sendmail", "options": {} } } }, "urac": { "passportLogin": { "twitter": { "clientID": "qywH8YMduIsKA2RRlUkS50kCZ", "clientSecret": "aodnXVCBijQcS8sJrcLM3ULgCl9VEoqqwu00XgamRUv5qm8bF1", "callbackURL": "http://local-widget.com/urac/login/success", userProfileURL: "https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true" }, "facebook": { clientID: '331502413866510', clientSecret: '1a07a7eb9c9884dc5d148106ede830b2', callbackURL: "http://local-widget.com/urac/login/success?mode=facebook" }, "google": { clientID: '393278808961-7qahk8kadr2jhbo05o84pbp5tc774a1l.apps.googleusercontent.com', clientSecret: 'sdSpS8FLeUvc0UBs_z8m4f89', callbackURL: "http://local-widget.com/urac/login/success" } }, "hashIterations": 1024, //used by hasher "seedLength": 32, //used by hasher "link": { "addUser": "http://dashboard.soajs.org/#/setNewPassword", "changeEmail": "http://dashboard.soajs.org/#/changeEmail/validate", "forgotPassword": "http://dashboard.soajs.org/#/resetPassword", "join": "http://dashboard.soajs.org/#/join/validate" }, "tokenExpiryTTL": 2 * 24 * 3600 * 1000,// token expiry limit in seconds "validateJoin": true, //true if registration needs validation "mail": { //urac mail options "join": { "subject": 'Welcome to SOAJS', "path": "./mail/urac/join.tmpl" }, "forgotPassword": { "subject": 'Reset Your Password at SOAJS', "path": "./mail/urac/forgotPassword.tmpl" }, "addUser": { "subject": 'Account Created at SOAJS', "path": "./mail/urac/addUser.tmpl" }, "changeUserStatus": { "subject": "Account Status changed at SOAJS", //use custom HTML "content": "<p>Dear <b>{{ username }}</b>, <br />Your account status has changed to <b>{{ status }}</b> by the administrator on {{ ts|date('F jS, Y') }}.<br /><br /> Regards,<br/> SOAJS Team. </p>" }, "changeEmail": { "subject": "Change Account Email at SOAJS", "path": "./mail/urac/changeEmail.tmpl" } } } } |
...