Merge pull request #1072 from strongloop/doc/user-settings
Document user settings
This commit is contained in:
commit
98678d5892
|
@ -46,6 +46,17 @@ var debug = require('debug')('loopback:user');
|
||||||
* @property {String} email Must be valid email
|
* @property {String} email Must be valid email
|
||||||
* @property {Boolean} emailVerified Set when a user's email has been verified via `confirm()`
|
* @property {Boolean} emailVerified Set when a user's email has been verified via `confirm()`
|
||||||
* @property {String} verificationToken Set when `verify()` is called
|
* @property {String} verificationToken Set when `verify()` is called
|
||||||
|
* @property {Object} settings Extends the `Model.settings` object.
|
||||||
|
* @property {Boolean} settings.emailVerificationRequired Require the email verification
|
||||||
|
* process before allowing a login.
|
||||||
|
* @property {Number} settings.ttl Default time to live (in seconds) for the `AccessToken` created by `User.login() / user.createAccessToken()`.
|
||||||
|
* Default is `1209600` (2 weeks)
|
||||||
|
* @property {Number} settings.maxTTL The max value a user can request a token to be alive / valid for.
|
||||||
|
* Default is `31556926` (1 year)
|
||||||
|
* @property {Boolean} settings.realmRequired Require a realm when logging in a user
|
||||||
|
* @property {String} settings.realmDelimiter When set a realm is required
|
||||||
|
* @property {Number} settings.resetPasswordTokenTTL Time to live for password reset `AccessToken`. Default is `900` (15 minutes)
|
||||||
|
* @property {Number} settings.saltWorkFactor The `bcrypt` salt work factor. Default is `10`.
|
||||||
*
|
*
|
||||||
* @class User
|
* @class User
|
||||||
* @inherits {PersistedModel}
|
* @inherits {PersistedModel}
|
||||||
|
|
|
@ -159,7 +159,9 @@ PersistedModel.findById = function find(id, cb) {
|
||||||
* <br/>See [Where filter](http://docs.strongloop.com/display/LB/Where+filter).
|
* <br/>See [Where filter](http://docs.strongloop.com/display/LB/Where+filter).
|
||||||
*
|
*
|
||||||
* @param {Function} Callback function called with `(err, returned-instances)`.
|
* @param {Function} Callback function called with `(err, returned-instances)`.
|
||||||
* @returns {Object} Array of model instances that match the filter; or Error.
|
* @callback {Function} callback
|
||||||
|
* @param {Error} err
|
||||||
|
* @param {Array} models Model instances matching the filter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PersistedModel.find = function find(params, cb) {
|
PersistedModel.find = function find(params, cb) {
|
||||||
|
|
Loading…
Reference in New Issue