PHPackages                             esd/security-plugin - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. esd/security-plugin

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

esd/security-plugin
===================

security-plugin

0.9(6y ago)075731MITPHP

Since May 8Pushed 6y ago3 watchersCompare

[ Source](https://github.com/esd-projects/security-plugin)[ Packagist](https://packagist.org/packages/esd/security-plugin)[ RSS](/packages/esd-security-plugin/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (9)Dependencies (3)Versions (10)Used By (1)

security-plugin
===============

[](#security-plugin)

```
    /**
     * @GetMapping("/login")
     */
    public function login() {
        $principal = new Principal();
        $principal->setUsername('elite');
        $principal->addRole('role1');
        $principal->addPermissions('p1');
        $principal->addPermissions('p2');
        $this->setPrincipal($principal);
        return 'success';
    }

    /**
     * @PreAuthorize()
     * @GetMapping()
     */
    public function auth1()
    {
        return '必须先访问/login';
    }

    /**
     * @PreAuthorize(all=true, deny=true)
     * @GetMapping()
     */
    public function auth2()
    {
        return '必须先访问/login';
    }

    /**
     * @PreAuthorize("p1")
     * @GetMapping()
     */
    public function auth3()
    {
        return '必须有p1权限';
    }

    /**
     * @PreAuthorize(value="p1", roles={"role1", "role2"}, ips={"172.21.0.0/16"})
     * @GetMapping("/auth4")
     */
    public function auth4()
    {
        return '必须有p1权限，role1或role2,ip掩码地址才可以访问';
    }

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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

Every ~3 days

Total

9

Last Release

2537d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5215c2bd3cf9b92c98b26cab75d61770de01c51d7997aeb744f98e8100d4823?d=identicon)[SwooleDistributed](/maintainers/SwooleDistributed)

---

Top Contributors

[![tmtbe](https://avatars.githubusercontent.com/u/5286367?v=4)](https://github.com/tmtbe "tmtbe (5 commits)")[![2807076495](https://avatars.githubusercontent.com/u/34940143?v=4)](https://github.com/2807076495 "2807076495 (1 commits)")

---

Tags

serverswoole

### Embed Badge

![Health badge](/badges/esd-security-plugin/health.svg)

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

PHPackages © 2026

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