2017 © Pedro Peláez
 

library httpauth

HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration

image

intervention/httpauth

HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration

  • Wednesday, June 28, 2017
  • by olivervogel
  • Repository
  • 5 Watchers
  • 29 Stars
  • 304,369 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 9 Versions
  • 16 % Grown

The README.md

Intervention HttpAuth

HTTP Authentication Management, (*1)

Latest Version Tests Monthly Downloads Support me on Ko-fi, (*2)

Installation

You can easily install this library using Composer. Just request the package with the following command:, (*3)

composer require intervention/httpauth

Documentation

Read the full documentation for this library., (*4)

Usage

The workflow is easy. Just create an instance of Authenticator::class in the first step and secure your resource in the second step., (*5)

1. Create Authenticator Instance

To create authenticator instances you can choose between different methods., (*6)

Create Instance by Using Static Factory Method

use Intervention\HttpAuth\Authenticator;

// create http basic auth
$auth = Authenticator::basic(
    'myUsername',
    'myPassword',
    'Secured Area',
);

// create http digest auth
$auth = Authenticator::digest(
    'myUsername',
    'myPassword',
    'Secured Area',
);

Create Instance by Using Class Constructor

use Intervention\HttpAuth\Authenticator;

// alternatively choose DigestVault::class
$vault = new BasicVault(
    'myUsername',
    'myPassword',
    'Secured Area',
);

$auth = new Authenticator($vault);

Create Instance by Static Factory Method

use Intervention\HttpAuth\Authenticator;

// alternatively choose DigestVault::class
$vault = new BasicVault(
    'myUsername',
    'myPassword',
    'Secured Area',
);

$auth = Authenticator::withVault($vault);

2. Ask User for Credentials

After you created a HTTP authentication instance, you have to call secure() to secure the resource. This results in a 401 HTTP response and the browser asking for credentials., (*7)

$auth->secure();

A character string can optionally be passed to the method. This is displayed if authentication fails. Output from template engines can also be used here., (*8)

$auth->secure('Sorry, you can not access this resource!');

Server Configuration

Apache

If you are using Apache and running PHP with CGI/FastCGI, check the server configuration to make sure the authorization headers are passed correctly to PHP:, (*9)

https://support.deskpro.com/en/kb/articles/missing-authorization-headers-with-apache, (*10)

Authors

This library is developed and maintained by Oliver Vogel, (*11)

Thanks to the community of contributors who have helped to improve this project., (*12)

License

Intervention HttpAuth is licensed under the MIT License., (*13)

The Versions

28/06 2017

dev-master

9999999-dev https://github.com/Intervention/httpauth

HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel authentication http

28/06 2017

2.0.3

2.0.3.0 https://github.com/Intervention/httpauth

HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel authentication http

29/01 2017

2.0.2

2.0.2.0 https://github.com/Intervention/httpauth

HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel authentication http

07/07 2015

2.0.1

2.0.1.0 https://github.com/Intervention/httpauth

HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel authentication http

31/01 2015

2.0.0

2.0.0.0 https://github.com/Intervention/httpauth

HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel authentication http

27/09 2014

1.0.3

1.0.3.0 https://github.com/Intervention/httpauth

HTTP authentication made to work with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel authentication http

20/09 2014

1.0.2

1.0.2.0 https://github.com/Intervention/httpauth

HTTP authentication made to work with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel authentication http

29/05 2013

1.0.1

1.0.1.0 https://github.com/Intervention/httpauth

HTTP authentication made to work with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel authentication http

09/02 2013

1.0.0

1.0.0.0 https://github.com/Intervention/httpauth

HTTP authentication made to work with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel authentication http