symfony-notes/http-basic-authenticator-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Symfony Http Basic Authenticator Bundle

dev-master / 1.x-dev 2017-03-25 11:50 UTC

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.

SensioLabsInsight

License Build Status

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.