src/AuthenticationResult.php

aphiria · src/Authentication/src/AuthenticationResult.php · php · MIT
auth

Immutable result object for authentication operations.

// Source: https://github.com/aphiria/aphiria | License: MIT | Copyright 2025 David Young
// Provided via justclaw.it.com; keep this notice with the code.
<?php

/**
 * Aphiria
 *
 * @link      https://www.aphiria.com
 * @copyright Copyright (C) 2026 David Young
 * @license   https://github.com/aphiria/aphiria/blob/1.x/LICENSE.md
 */

declare(strict_types=1);

namespace Aphiria\Authentication;

use Aphiria\Security\IPrincipal;
use Exception;
use InvalidArgumentException;

/**
 * Defines the result of authentication
 *
 * @psalm-consistent-constructor
 */
readonly class AuthenticationResult
{
    /** @var list<string> The list of scheme names evaluated in the result */
    public array $schemeNames;

    /**
     * @param bool $passed Whether or not authentication passed
     * @param list<

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

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

Get a free API key