symfony-notes / http-basic-authenticator-bundle
Symfony Http Basic Authenticator Bundle
Installs: 25 594
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.0.11
- symfony/framework-bundle: ^3.2
- symfony/security: ^3.2
Requires (Dev)
- phpunit/php-code-coverage: ^4.0.4
- phpunit/phpunit: ^5.7.17
This package is auto-updated.
Last update: 2023-02-09 10:31:28 UTC
README
This bundle will help you to add http basic authentication
, with custom credentials checkers and custom response, in to you project.
Installation
- Require the bundle with composer:
composer require symfony-notes/http-basic-authenticator-bundle
- Enable the bundle in the kernel:
public function registerBundles() { $bundles = [ // ... new SymfonyNotes\HttpBasicAuthenticatorBundle\SymfonyNotesHttpBasicAuthenticatorBundle(), // ... ]; ... }
- Enable the authenticator in
security.yml
security: ... firewalls: ... default: guard: authenticators: - notes.http_basic_authenticator
Configuration
Default bundle configuration:
notes_http_basic_authenticator: realm_message: Realm supports_remember_me: false failure_response: notes.authenticator_failure_response.plain
realm_message configuration allow you change http header WWW-Authenticate: Basic realm="{you_text}"
.
supports_remember_me enable|disable Symfony "Remember Me" functionality.
failure_response allow you to set you own service, that will return response for authentication fail.