Class: GMEAuth

Server:GMEAuth~GMEAuth(session, gmeConfig) → {Object}

new GMEAuth(session, gmeConfig) → {Object}

Parameters:
Name Type Description
session
gmeConfig
Source:
Returns:
Type
Object

Methods

(inner) addMongoOpsToPromize()

'_organizations' collection has these fields: _id: username projects: map from project name to object {read:, write:, delete: }

Source:

(inner) addOrganization(orgId, callbackopt) → {*}

Parameters:
Name Type Attributes Description
orgId string
callback function <optional>
Source:
Returns:
Type
*

(inner) addUser(userId, email, password, canCreateopt, options, callbackopt) → {*}

Parameters:
Name Type Attributes Default Description
userId string
email string
password string
canCreate boolean <optional>
false
options object
callback function <optional>
Source:
Returns:
Type
*

(inner) addUserToOrganization(userId, orgId, callbackopt) → {*}

Parameters:
Name Type Attributes Description
userId
orgId string
callback function <optional>
Source:
Returns:
Type
*

(inner) connect(callbackopt) → {*}

Parameters:
Name Type Attributes Description
callback function <optional>
Source:
Returns:
Type
*

(inner) deleteUser(userId, force, callbackopt) → {*}

Parameters:
Name Type Attributes Description
userId string
force boolean

removes the user from the db completely

callback function <optional>
Source:
Returns:
Type
*

(inner) getOrganization(orgId, {object, callbackopt) → {*}

Parameters:
Name Type Attributes Description
orgId string
{object

[query]

callback function <optional>
Source:
Returns:
Type
*

(inner) getUser(userId, {object, callbackopt) → {*}

Parameters:
Name Type Attributes Description
userId string
{object

[query]

callback function <optional>
Source:
Returns:
Type
*

(inner) listOrganizations(queryopt, callbackopt) → {*}

Parameters:
Name Type Attributes Description
query object <optional>
callback function <optional>
Source:
Returns:
Type
*

(inner) listUsers(queryopt, projectionopt, callbackopt) → {*}

Parameters:
Name Type Attributes Description
query object <optional>
projection object <optional>
callback function <optional>
Source:
Returns:
Type
*

(inner) reEnableUser(userId, callbackopt) → {*}

Parameters:
Name Type Attributes Description
userId string
callback function <optional>
Source:
Returns:
Type
*

(inner) removeOrganizationByOrgId(orgId, forceopt, callbackopt) → {*}

Parameters:
Name Type Attributes Default Description
orgId string
force boolean <optional>
false

delete organization from db.

callback function <optional>
Source:
Returns:
Type
*

(inner) removeUserFromOrganization(userId, orgId, callbackopt) → {*}

Parameters:
Name Type Attributes Description
userId
orgId
callback function <optional>
Source:
Returns:
Type
*

(inner) setAdminForUserInOrganization(userId, orgId, makeAdmin, callbackopt) → {*}

Parameters:
Name Type Attributes Description
userId string
orgId string
makeAdmin boolean
callback function <optional>
Source:
Returns:
Type
*

(inner) unload(callbackopt) → {*}

Parameters:
Name Type Attributes Description
callback function <optional>
Source:
Returns:
Type
*

(inner) updateOrganizationInfo(orgId, {object, callbackopt) → {*}

Parameters:
Name Type Attributes Description
orgId string
{object

info

callback function <optional>
Source:
Returns:
Type
*

(inner) updateUser(userId, userData, callbackopt) → {*}

Updates/overwrites provided fields for the userData.

Parameters:
Name Type Attributes Description
userId string
userData object
callback function <optional>
Source:
Returns:
Type
*

(inner) updateUserComponentSettings(userId, componentId, settings, overwriteopt, callbackopt) → {*}

Updates the provided fields in the settings stored at given componentId.

Parameters:
Name Type Attributes Description
userId string
componentId string
settings object
overwrite boolean <optional>

if true the settings for the key will be overwritten.

callback function <optional>
Source:
Returns:
Type
*

(inner) updateUserDataField(userId, data, overwriteopt, callbackopt) → {*}

Updates the provided fields in data (recursively) within userData.data.

Parameters:
Name Type Attributes Description
userId string
data object
overwrite boolean <optional>

if true the settings for the key will be overwritten.

callback function <optional>
Source:
Returns:
Type
*

(inner) updateUserSettings(userId, settings, overwriteopt, callbackopt) → {*}

Updates the provided fields in the settings.

Parameters:
Name Type Attributes Description
userId string
settings object
overwrite boolean <optional>

if true the settings for the key will be overwritten.

callback function <optional>
Source:
Returns:
Type
*