beforeAuthenticate(func) {
        let self = this;
        /* istanbul ignore next */
        return new Promise(function (fulfill, reject) {
            if (typeof func == "function") {