PHPackages                             ac/firewall - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. ac/firewall

ActiveLibrary[Security](/categories/security)

ac/firewall
===========

Request verification component for PHP 5.3+.

2163PHP

Since Aug 27Pushed 13y ago4 watchersCompare

[ Source](https://github.com/AmericanCouncils/Firewall)[ Packagist](https://packagist.org/packages/ac/firewall)[ RSS](/packages/ac-firewall/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Firewall
========

[](#firewall)

This component provides a starting point for an authentication system that can be used for validating any incoming `Request` instance. All you need to do to use it is to configure the `Firewall` instance however you like, and tell it to verify a `Request` object with `Firewall::verifyRequest`.

The Firewall works by providing its own series of events that you can hook into with your own code in order to implement whatever types of authentication proceedures you need.

If the firewall succeeds in verifying the request, it returns true. If there is a failure, it may return a response instance, or an exception will be thrown.

Usage
-----

[](#usage)

Here is the most basic usage of the firewall for verifying incoming requests based on an IP blacklist and/or whitelist. It takes a bit of set up, it's most useful if used with a framework that provides some solution for managing configuration and dependency injection.

```
