function (req, cb) {
        let config = req.soajs.config;

        let loginMode = config.loginMode;
        if (req.soajs.tenantOauth && req.soajs.tenantOauth.loginMode) {
            loginMode = req.soajs.tenantOauth.loginMode;
        }

        let criteria = {
            "userId.loginMode": loginMode,
            "userId.id": req.soajs.inputmaskData.userId
        };
        let combo = {
            collection: tokenCollectionName,
            condition: criteria
        };

        libProduct.model.removeEntry(req.soajs, combo, function (error, result) {
            let data = {config: req.soajs.config, error: error, code: 404};
            checkIfError(req, cb, data, function () {
                return cb(null, result.result);
            });
        });
    }
function (req, cb) {
        let config = req.soajs.config;

        let loginMode = config.loginMode;
        if (req.soajs.tenantOauth && req.soajs.tenantOauth.loginMode) {
            loginMode = req.soajs.tenantOauth.loginMode;
        }

        let criteria = {
            "userId.loginMode": loginMode,
            "userId.id": req.soajs.inputmaskData.userId
        };
        let combo = {
            collection: tokenCollectionName,
            condition: criteria
        };

        libProduct.model.removeEntry(req.soajs, combo, function (error, result) {
            let data = {config: req.soajs.config, error: error, code: 404};
            checkIfError(req, cb, data, function () {
                return cb(null, result.result);
            });
        });
    }
function ( req , cb ) { let config = req . soajs . config ; let loginMode = config . loginMode ; if ( req . soajs . tenantOauth && req . soajs . tenantOauth . loginMode ) { loginMode = req . soajs . tenantOauth . loginMode ; } let criteria = { "userId.loginMode" : loginMode , "userId.id" : req . soajs . inputmaskData . userId } ; let combo = { collection : tokenCollectionName , condition : criteria } ; libProduct . model . removeEntry ( req . soajs , combo , function ( error , result ) { let data = { config : req . soajs . config , error : error , code : 404 } ; checkIfError ( req , cb , data , function ( ) { return cb ( null , result . result ) ; } ) ; } ) ; }
Delete All tokens of a user
Delete All tokens of a user