public function testWhitelistFail() { try { $this->assertFalse(Whitelist::get("127.0.0.3")->check()); } catch (InvalidAuthException $e) { $this->assertEquals(401, $e->getCode()); } }
public function checkWhitelist($method_annotation) { // do whitelist check $method_annotation->has("Whitelist") ? WhitelistSecurity::get($this->request->getClientAddress())->check() : true; }