lib/auth/in_memory/checker.js
/**
 * @param {object} authdata - the authentication config file's data
 * @return {boolean} true on erroneous data
 *                   false on success
 */
@param {object} authdata - the authentication config file's data
@return {boolean} true on erroneous data
false on success
@param { object } authdata - the authentication config file ' s data @return { boolean } true on erroneous data false on success
function check(authdata) {
    const checkData = {
        errors: [],
        emails: [],
        arns: [],
        canonicalIds: [],
        keys: [],
    };
    if (authdata.accounts === undefined) {
        checkData.errors.push({
            txt: 'no "accounts" array defined in Auth config',
        });
        return dumpErrors(checkData);
    }
    authdata.accounts.forEach(account => {
        checkAccount(checkData, account);
    });
    return dumpErrors(checkData);
}
function check ( authdata ) { const checkData = { errors : [ ] , emails : [ ] , arns : [ ] , canonicalIds : [ ] , keys : [ ] , } ; if ( authdata . accounts === undefined ) { checkData . errors . push ( { txt : 'no "accounts" array defined in Auth config' , } ) ; return dumpErrors ( checkData ) ; } authdata . accounts . forEach ( account => { checkAccount ( checkData , account ) ; } ) ; return dumpErrors ( checkData ) ; }
@param {object} authdata - the authentication config file's data
 @return {boolean} true on erroneous data
                   false on success
@param { object } authdata - the authentication config file ' s data @return { boolean } true on erroneous data false on success