Developed with love by KnpLabs Hire us for your project!
215

two-factor-bundle

by scheb

Two-factor authentication for Symfony applications

scheb/two-factor-bundle

Build Status
Scrutinizer Code Quality
Code Coverage
Latest Stable Version
License

This bundle provides two-factor authentication for your Symfony application. It comes with the following two-factor
authentication methods:

  • Google Authenticator
  • Email authentication code

Additional features you will like:
- Interface for custom two-factor authentication methods
- Trusted IPs
- Trusted devices (once passed, no more two-factor authentication on that device)
- Single-use backup codes for when you don't have access to the second factor device
- Multi-factor authentication

Installation

composer require scheb/two-factor-bundle

... and follow the installation instructions.

Documentation

Detailed documentation of all features can be found in the Resources/doc directory.

Compatibility

  • Recommended version: Bundle version 3.x is compatible with Symfony 3.4 and 4.x
  • Use bundle version 2.x for Symfony < 3.4
  • Use bundle version 1.x for Symfony < 2.6

Contribute

You're welcome to contribute to this bundle by
creating a pull requests or feature request in the issues section.

Besides new features, translations are highly welcome.

To run the test suite install the dependencies with composer install and then execute bin/phpunit.

License

This bundle is available under the MIT license.

The MIT License (MIT)

Copyright (c) 2018 Christian Scheb

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
scheb_two_factor:
persister: ~
model_manager_name: ~
trusted_device:
enabled: false
manager: ~
lifetime: 5184000
extend_lifetime: false
cookie_name: trusted_device
cookie_secure: false
cookie_same_site: lax
backup_codes:
enabled: false
manager: ~
email:
enabled: false
mailer: ~
code_generator: ~
sender_email: no-reply@example.com
sender_name: ~
template: @SchebTwoFactor/Authentication/form.html.twig
digits: 4
google:
enabled: false
issuer: ~
server_name: ~
template: @SchebTwoFactor/Authentication/form.html.twig
security_tokens:

# Default:
- Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken
ip_whitelist: []
  • Update messages.nl.yml
    By scheb, 6 months ago
  • Add aliases for auto-wiring
    By scheb, 7 months ago
  • How to execute the test suite
    By scheb, 7 months ago
  • Add test cases for IPv6 and network masks
    By scheb, 7 months ago
  • Allow netmasks to be used in IP whitelist configuration
    By scheb, 7 months ago
  • Refactor DIC config for persister to work even when Doctrine is not installed
    By scheb, 7 months ago
  • Remove coveralls config
    By scheb, 7 months ago
  • Remove unnecessary check, return type will make sure it's Response
    By scheb, 7 months ago
  • Fix type annotation
    By scheb, 7 months ago
  • Add Scrutinizer badges
    By scheb, 7 months ago
  • Fix condition
    By scheb, 7 months ago
  • Comment on empty catch blocks
    By scheb, 7 months ago
  • Use Scrutinizer for code coverage and checks
    By scheb, 7 months ago
  • Add test case for controller
    By scheb, 7 months ago
  • Provide authentication error and data
    By scheb, 7 months ago
  • Fix namespace
    By scheb, 7 months ago
  • Upgrade note
    By scheb, 7 months ago
  • Remove backslash
    By scheb, 7 months ago
  • Implement authentication form
    By scheb, 7 months ago
  • Change position
    By scheb, 7 months ago
  • Add TwoFactorFirewallContext and TwoFactorFirewallConfig
    By scheb, 7 months ago
  • Add phpcs-fixer config
    By scheb, 7 months ago
  • Fix PHPDoc
    By scheb, 7 months ago
  • Rename class
    By scheb, 7 months ago
  • Move exception to be used in TwoFactorProviderRegistry
    By scheb, 7 months ago
  • Docs on form renderers
    By scheb, 7 months ago
  • Docs on email code generator
    By scheb, 7 months ago
  • Code style
    By scheb, 7 months ago
  • Add provider registry
    By scheb, 7 months ago
  • Remove PHPDoc
    By scheb, 7 months ago