定制 phpolar/csrf-protection 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phpolar/csrf-protection

最新稳定版本:3.2.2

Composer 安装命令:

composer require phpolar/csrf-protection

包简介

Provides request checking and response filtering to mitigate CSRF attacks

README 文档

README

Csrf Protection

PSR-7 and PSR-15 based CSRF protection for HTTP requests

Coverage Status Latest Stable Version Total Downloads PHP Version Require Weekly Check

Table of Contents

  1. Installation
  2. Usage
  3. Resources
  4. API Documentation

Installation

composer require phpolar/csrf-protection

Usage

$csrfChecking = $this->container->get(CsrfRequestCheckMiddleware::class);
$csrfFiltering = $this->container->get(CsrfResponseFilterMiddleware::class);

$app->use($csrfChecking);
$app->use($csrfFiltering);

// ...

$response = $csrfCheckMiddleware->process($request, $nextHandler);

// ...

$preparedResponse = $middleWare->process($request, $routingHandler);

Resources

  1. PSR-7
  2. PSR-15
  3. Example middleware setup

API Documentation

Thresholds

Source Code Size Memory Usage
4.3 kB 108 kB

Back to top

统计信息

  • 总下载量: 1.33k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 6
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-18