Menu

## MustBeOTP
in package
uses AuthenticationProcess

MustBeOTP.php : 11

### Table of Contents

#### Methods

checkAuthentication() : int
  Check whether a registration OTP for the user has been verified.
createAuthentication() : void
  Create an OTP authentication record for a user and send the OTP.
handle() : mixed
  Handle an incoming request.

### Methods

#### checkAuthentication()

AuthenticationProcess.php : 73

Check whether a registration OTP for the user has been verified.

`public checkAuthentication(int $user_id) : int`

##### Parameters

$user_id : int

  User identifier

##### Return values

int —

Status flag from authentication record (0 or 1)

#### createAuthentication()

AuthenticationProcess.php : 28

Create an OTP authentication record for a user and send the OTP.

`public createAuthentication(User $user, Request|string $request, string $type) : void`

##### Parameters

$user : User

  Target user

$request : Request|string

  Request object or empty string when unavailable

$type : string

  Authentication type (e.g., register, login)

#### handle()

MustBeOTP.php : 22

Handle an incoming request.

`public handle(Request $request, Closure $next) : mixed`

##### Parameters

$request : Request
$next : Closure

## Search results