public function validate($otp, $action, $uid = null, $data = null) {
    $hash  = $this->psl['crypt/hash'];
    $store = $this->psl['store'];

    if($uid === null) {
	    $uid = $this->psl->getUid();
	  }

    $storeData = $store->read('otp', $this->storeId($uid, $action));

    if($storeData !== false) {
      if($storeData['ttl'] < time()) {
        $store->delete('otp', $this->storeId($uid, $action));
        return false;
      }

      if($hash->check($otp, $storeData['pw']) && $hash->check(serialize($data), $storeData['data'])) {
        $store->delete('otp', $this->storeId($uid, $action));
        return true;
      }
    }
    return false;
  }