function addClient (mail, key, secret, callback) {
    var id = hash(mail + key);
    if (registryMap.hasOwnProperty(id)) {
        callback(new Error('This API key exists already.'));
        return;
    } else {
        registryMap[id] = registry.length;
        registry.push({
            mail: mail,
            key: key,
            secret: secret
        });
    }
    save(function(error) {
        if (typeof callback != 'function') {
            return;
        }
        if (error) {
            callback(error);
        } else {
            callback(null);
        }
    });
}
/**
 * Adds a client to the registry.
 *
 * @param mail
 * @param key
 * @param secret
 * @param callback
 */
Adds a client to the registry.
Adds a client to the registry .
function addClient (mail, key, secret, callback) {
    var id = hash(mail + key);
    if (registryMap.hasOwnProperty(id)) {
        callback(new Error('This API key exists already.'));
        return;
    } else {
        registryMap[id] = registry.length;
        registry.push({
            mail: mail,
            key: key,
            secret: secret
        });
    }
    save(function(error) {
        if (typeof callback != 'function') {
            return;
        }
        if (error) {
            callback(error);
        } else {
            callback(null);
        }
    });
}
function addClient ( mail , key , secret , callback ) { var id = hash ( mail + key ) ; if ( registryMap . hasOwnProperty ( id ) ) { callback ( new Error ( 'This API key exists already.' ) ) ; return ; } else { registryMap [ id ] = registry . length ; registry . push ( { mail : mail , key : key , secret : secret } ) ; } save ( function ( error ) { if ( typeof callback != 'function' ) { return ; } if ( error ) { callback ( error ) ; } else { callback ( null ) ; } } ) ; }
Adds a client to the registry.
Adds a client to the registry .