isRevokedPromise (payload) {
    if (!payload.jti) {
      this.yggdrasil.fire('log', 'warn', 'no JTI in JWT', JSON.stringify(payload));
      return Bluebird.reject(new Error('Invalid JWT'));
    }

    return this.yggdrasil.storageService.getCache(this.sessionId(payload.jti, this.yggdrasil.config.iss))
      .then(resp => {
        if(resp) {
          return Bluebird.resolve(false);
        }
        throw new Error('Revoked JWT');
      })
      .catch(() => {
        this.yggdrasil.fire('log', 'warn', 'Revoked JWT', JSON.stringify(payload));
        return Bluebird.reject(new Error('Revoked JWT'));
      });
  }
/**
   * Same as isRevoked but uses promises (used by socketio-jwt and this.isRevoked)
   * @param payload the given payload to check
   * @returns {Promise|Promise<T | Promise>}
   */
Same as isRevoked but uses promises (used by socketio-jwt and this.isRevoked)
@param payload the given payload to check
@returns {Promise|Promise}
Same as isRevoked but uses promises ( used by socketio - jwt and this . isRevoked ) @param payload the given payload to check @returns { Promise|Promise }
isRevokedPromise (payload) {
    if (!payload.jti) {
      this.yggdrasil.fire('log', 'warn', 'no JTI in JWT', JSON.stringify(payload));
      return Bluebird.reject(new Error('Invalid JWT'));
    }
    return this.yggdrasil.storageService.getCache(this.sessionId(payload.jti, this.yggdrasil.config.iss))
      .then(resp => {
        if(resp) {
          return Bluebird.resolve(false);
        }
        throw new Error('Revoked JWT');
      })
      .catch(() => {
        this.yggdrasil.fire('log', 'warn', 'Revoked JWT', JSON.stringify(payload));
        return Bluebird.reject(new Error('Revoked JWT'));
      });
  }
isRevokedPromise ( payload ) { if ( ! payload . jti ) { this . yggdrasil . fire ( 'log' , 'warn' , 'no JTI in JWT' , JSON . stringify ( payload ) ) ; return Bluebird . reject ( new Error ( 'Invalid JWT' ) ) ; } return this . yggdrasil . storageService . getCache ( this . sessionId ( payload . jti , this . yggdrasil . config . iss ) ) . then ( resp => { if ( resp ) { return Bluebird . resolve ( false ) ; } throw new Error ( 'Revoked JWT' ) ; } ) . catch ( ( ) => { this . yggdrasil . fire ( 'log' , 'warn' , 'Revoked JWT' , JSON . stringify ( payload ) ) ; return Bluebird . reject ( new Error ( 'Revoked JWT' ) ) ; } ) ; }
Same as isRevoked but uses promises (used by socketio-jwt and this.isRevoked)
 @param payload the given payload to check
 @returns {Promise|Promise<T | Promise>}
Same as isRevoked but uses promises ( used by socketio - jwt and this . isRevoked ) @param payload the given payload to check @returns { Promise|Promise<T | Promise > }