Frederic G. MARAND 0c5f127166 Complete (?) configurable fake accounts package. | hace 8 años | |
---|---|---|
.. | ||
README.md | hace 8 años |
service_configuration_common.js
: defines the collection publish and a ServiceConfiguration.ConfigError
error class.service_configuration_server.hs
: ensures the index on the service collection.This package just provides access to a configuration collection in ServiceConfiguration.configurations
. Packages using the configuration are expected to use Mongo queries on that collection, find-ing using { service: service_name }
.
All properties of that collection are published client-side, except secret
which is only available server-side.
Configuration is inserted by the AccountsServer.configureLoginService(options)
method from accounts-base
. In Meteor core, this method is used by login_buttons_dialogs.js
like:
Accounts.connection.call("configureLoginService", configuration, function (error, result) {
if (error)
Meteor._debug("Error configuring login service " + serviceName, error);
else
loginButtonsSession.set('configureLoginServiceDialogVisible', false);
}
);
meteor_accounts_loginServiceConfiguration
{ "service": 1 }, { unique: true }
The service-configuration package persists configuration in the meteor_accounts_loginServiceConfiguration
collection in MongoDB. As each service should have exactly one configuration, Meteor automatically creates a MongoDB index with a unique constraint on the meteor_accounts_loginServiceConfiguration
collection.
None
None
None
package.js
et al.)Symbol | Client | Server | Test |
---|---|---|---|
ServiceConfiguration | O | O | O |
Silently used (without a declared dependency) in accounts-base
.
accounts-base
mongo