PHP Classes

File: src/MultiFactorInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   PHP Multi Factor Authentication   src/MultiFactorInterface.php   Download  
File: src/MultiFactorInterface.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Multi Factor Authentication
2 factor authentication independent of the vendor
Author: By
Last change:
Date: 5 years ago
Size: 578 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);

namespace
ParagonIE\MultiFactor;

/**
 * Interface MultiFactorInterface
 *
 * All MFA solutions should implement this interface.
 *
 * @package ParagonIE\MultiFactor
 */
interface MultiFactorInterface
{
   
/**
     * This should return a one-time password the user should enter.
     *
     * @return string
     */
   
public function generateCode(): string;

   
/**
     * This should validate a code for a particular user.
     *
     * @param string $code
     * @return bool
     */
   
public function validateCode(string $code): bool;
}