PHPackages                             anonym-php/anonym-security - 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. anonym-php/anonym-security

ActiveLibrary[Security](/categories/security)

anonym-php/anonym-security
==========================

AnonymFramework Security Component

1.2.x-dev(10y ago)0149MITPHP

Since Aug 8Pushed 10y ago2 watchersCompare

[ Source](https://github.com/AnonymPHP/Anonym-Security)[ Packagist](https://packagist.org/packages/anonym-php/anonym-security)[ Docs](https://gemframework.com)[ RSS](/packages/anonym-php-anonym-security/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Anonym-Security
===============

[](#anonym-security)

these component will be used for framework security

TypeHint
--------

[](#typehint)

```
TypeHint::boot();
TypeHint::handle();
```

Firewall
--------

[](#firewall)

```
$allowed = [
  'allowedUserAgent' => 'mozilla',
  'allowedAccept' => '*',
  'allowedLanguage' => 'tr-TR',
  'allowedReferer' => 'www.google.com',
  'allowedMethod' => ['GET', 'POST'],
  'allowedConnection' => '*',
  'allowedEncoding' => 'utf-8'
];

$firewall = new Firewall($allowed);
$firewall->run();
```

Authentication
--------------

[](#authentication)

Login, Exit and more in this namespace

**Login:**

```
use Anonym\Components\Security\Authentication\Login;
use Anonym\Components\Security\Authentication\AuthenticationLoginObject;
$login = new Login($db, $tables);

$remember = true; // giriş işlemi cookie 'e atanacakmı?
$login = login->login('username', 'password', $remember);

var_dump($login); // false or AuthenticationLoginObject

 if($login instanceof AuthenticationLoginObject){

   echo $login['username']; // arrayable class

 }

```

**Register:**

```
use Anonym\Components\Security\Authentication\Register;

$register = new Register($db, $tables);
$register = register->register([
 'username' => 'test',
 'password' => 'test'
]);

var_dump($register); // true or false
```

**Exit:**

```
use Anonym\Components\Security\Authentication\Logout;
$logout = new Logout();
$logout->logout(); // true
```

Security
--------

[](#security)

**xss protection:**

```
$security = new Security();
$xss = $security->xssProtection($metin);
``,

CsrfToken
---------

```php

$csrf = new CsrfToken();
$token = $csrf->getToken(); // $csrf->token;
```

---

**check the csrf token**

```
$csrf->run();
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3936d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c3f1e53b43ef665cfe41f9c7fa30ca07d8c615020c30eeccdc4be0209a32bc3?d=identicon)[anonymframework](/maintainers/anonymframework)

---

Top Contributors

[![vahitserifsaglam1](https://avatars.githubusercontent.com/u/9705445?v=4)](https://github.com/vahitserifsaglam1 "vahitserifsaglam1 (84 commits)")[![anonymframework](https://avatars.githubusercontent.com/u/13378594?v=4)](https://github.com/anonymframework "anonymframework (1 commits)")

---

Tags

security

### Embed Badge

![Health badge](/badges/anonym-php-anonym-security/health.svg)

```
[![Health](https://phpackages.com/badges/anonym-php-anonym-security/health.svg)](https://phpackages.com/packages/anonym-php-anonym-security)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[voku/anti-xss

anti xss-library

72317.1M77](/packages/voku-anti-xss)[spatie/laravel-csp

Add CSP headers to the responses of a Laravel app

8519.6M19](/packages/spatie-laravel-csp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
