Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_once 'libs/Slim/Extras/HttpDigestAuth.php';
- class HttpDigestAuthCustom extends HttpDigestAuth {
- protected $route;
- public function __construct($username, $password, $realm = 'Protected Area', $route = '') {
- $this->route = $route;
- parent::__construct($username, $password, $realm);
- }
- public function call() {
- if(strpos($this->app->request()->getPathInfo(), $this->route) !== false) {
- parent::call();
- return;
- }
- $this->next->call();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement