Passwords/TokenRepositoryInterface.php

framework · src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php · php · MIT
auth, tag:embed-classified

Interface defining methods for creating, validating, and deleting password reset tokens.

// Source: https://github.com/laravel/framework | License: MIT | Copyright Taylor Otwell
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace Illuminate\Auth\Passwords;

use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;

interface TokenRepositoryInterface
{
    /**
     * Create a new token.
     *
     * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
     * @return string
     */
    public function create(CanResetPasswordContract $user);

    /**
     * Determine if a token record exists and is valid.
     *
     * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
     * @param  string  $token
     * @return bool
     */
    public function exists(CanResetPasswordContract $user, #[\SensitiveParameter] $token);

 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key