<?php

/*
 * This file is part of the AuthStack project.
 *
 * (c) Buckhill Ltd <development@buckhill.co.uk>
 *
 * This source file is subject to the Buckhill license that is bundled
 * with this source code in the file LICENSE.
 */

namespace AuthStack\TwoFactor\Collection;

use AuthStack\TwoFactor\Model\MFAKey;

interface KeyCollectionInterface
{
    const TYPE_OTP = 'otp';
    const TYPE_U2F = 'u2f';

    public static function loadForUser($id);

    public function add(array $data, $confirmed = 0);

    public function update($id, array $data);

    public function enable($key_id, $user_id);

    public function enroll($app_id, $title);

    public function register($challenge_id, array $data);

    public function challenge(callable $transform = null);

    public function authenticate($challenge_id, array $responseData);

    public function verifyOTP($otp);

    public function getKeyCollection();

    public function count();

    public function hasU2F();

    public function hasOTP();

    public function getOTPKeys();

    public function getU2FKeys();

    public function getKeyList($user_id = null);

    public function remove($id);

    public function getLastError();
}