damejidlo / http-auth
Installs: 76 531
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 10
Forks: 0
Open Issues: 0
Requires
- php: >= 7.0
- nette/di: ^2.4
- nette/http: ^2.4
- roave/security-advisories: @dev
Requires (Dev)
- damejidlo/coding-standard: ^0.5.0
- mockery/mockery: ^0.9.8
- nette/tester: ^1.7
- phpstan/phpstan: ^0.6.4
- phpstan/phpstan-nette: ^0.6.2
This package is auto-updated.
Last update: 2020-01-16 15:01:16 UTC
README
This library provides simple HTTP authentication for your Nette application.
Requirements
Installation
The best way to install Damejidlo/http-auth is using Composer:
$ composer require damejidlo/http-auth
After install you need to register the extension:
extensions: httpAuth: Damejidlo\Security\DI\HttpAuthExtension(%consoleMode%) # you need to pass the %consoleMode% parameter (You don't want to require username and password in console)
The extension can be configured safely on production environment, because is not activated yet.
For requiring username and password, you should put in config.local.neon
on staging environment:
httpAuth: username: someSecretUsername password: SomeSecretPassword
After redeploy (or clear cache), you should be now prompted for username and password via HTTP basic auth.