{"id":34629110,"url":"https://github.com/esd-projects/security-plugin","last_synced_at":"2026-01-20T16:39:26.993Z","repository":{"id":56979218,"uuid":"185552757","full_name":"esd-projects/security-plugin","owner":"esd-projects","description":null,"archived":false,"fork":false,"pushed_at":"2019-07-20T01:40:08.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-27T14:56:30.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esd-projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-08T07:15:41.000Z","updated_at":"2019-07-20T01:40:10.000Z","dependencies_parsed_at":"2022-08-21T10:50:15.582Z","dependency_job_id":null,"html_url":"https://github.com/esd-projects/security-plugin","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/esd-projects/security-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esd-projects%2Fsecurity-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esd-projects%2Fsecurity-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esd-projects%2Fsecurity-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esd-projects%2Fsecurity-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esd-projects","download_url":"https://codeload.github.com/esd-projects/security-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esd-projects%2Fsecurity-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28004718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T16:33:22.478Z","updated_at":"2025-12-24T16:33:27.978Z","avatar_url":"https://github.com/esd-projects.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# security-plugin\n```\n    /**\n     * @GetMapping(\"/login\")\n     */\n    public function login() {\n        $principal = new Principal();\n        $principal-\u003esetUsername('elite');\n        $principal-\u003eaddRole('role1');\n        $principal-\u003eaddPermissions('p1');\n        $principal-\u003eaddPermissions('p2');\n        $this-\u003esetPrincipal($principal);\n        return 'success';\n    }\n    \n    /**\n     * @PreAuthorize()\n     * @GetMapping()\n     */\n    public function auth1()\n    {\n        return '必须先访问/login';\n    }\n    \n    /**\n     * @PreAuthorize(all=true, deny=true)\n     * @GetMapping()\n     */\n    public function auth2()\n    {\n        return '必须先访问/login';\n    }\n    \n    /**\n     * @PreAuthorize(\"p1\")\n     * @GetMapping()\n     */\n    public function auth3()\n    {\n        return '必须有p1权限';\n    }\n    \n    /**\n     * @PreAuthorize(value=\"p1\", roles={\"role1\", \"role2\"}, ips={\"172.21.0.0/16\"})\n     * @GetMapping(\"/auth4\")\n     */\n    public function auth4()\n    {\n        return '必须有p1权限，role1或role2,ip掩码地址才可以访问';\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesd-projects%2Fsecurity-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesd-projects%2Fsecurity-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesd-projects%2Fsecurity-plugin/lists"}