![]() 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/Token/ |
<?php namespace Intervention\HttpAuth\Token; use Intervention\HttpAuth\Key; class HttpAuthentification extends NullToken { /** * Parsed authentification value * * @var string */ protected $value; /** * Transform current instance to key object * * @return Key */ public function toKey(): Key { list($username, $password) = explode(':', base64_decode(substr($this->value, 6))); $key = new Key(); $key->setProperty('username', $username); $key->setProperty('password', $password); return $key; } /** * Parse environment variables and store value in object * * @return bool "true" if value was found or "false" */ protected function parse(): bool { $value = $this->getArrayValue($_SERVER, 'HTTP_AUTHENTICATION'); if (strtolower(substr($value, 0, 5)) === 'basic') { $this->value = $value; return true; } return false; } }