2FAuth/app/Models/WebAuthnAuthenticatable.php

41 lines
937 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Laragear\WebAuthn\Contracts\WebAuthnAuthenticatable as Authenticatable;
interface WebAuthnAuthenticatable extends Authenticatable
{
/**
* Return the handle used to identify his credentials.
*
* @return string
*/
2022-11-22 15:15:52 +01:00
public function userHandle() : string;
/**
* Saves a new alias for a given WebAuthn credential.
*
2022-11-22 15:15:52 +01:00
* @param string $id
* @param string $alias
* @return bool
*/
2022-11-22 15:15:52 +01:00
public function renameCredential(string $id, string $alias) : bool;
/**
* Removes one or more credentials previously registered.
*
* @param string|array $id
* @return void
*/
2022-11-22 15:15:52 +01:00
public function flushCredential($id) : void;
/**
* Sends a webauthn recovery email to the user.
*
* @param string $token
* @return void
*/
2022-11-22 15:15:52 +01:00
public function sendWebauthnRecoveryNotification(string $token) : void;
}