承接 jgxvx/cilician-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

jgxvx/cilician-bundle

最新稳定版本:6.0.0

Composer 安装命令:

composer require jgxvx/cilician-bundle

包简介

Accessing haveibeenpwned.com API's from Symfony applications.

README 文档

README

Bundle to integrate cilician, a haveibeenpwned.com API client for PHP, into Symfony applications.

pipeline status coverage report

Installation

$ composer require jgxvx/cilician-bundle

Documentation

This bundle wraps the Cilician library. Please refer to the library documentation to learn what you can do with it.

Services

The bundle provides two public services: The main library service, cilician, and the password validator cilician.validator.isunbreachedpassword.

cilician Service

Type-hint your parameter with Jgxvx\Cilician\Service\Cilician or require the service by its alias cilician to inject the service into your components.

Password Validator & Constraint

To prevent users from choosing a password that has appeared in a documented data breach, add an IsUnbreachedPassword constraint to your signup form:

$builder
    ->add('password', PasswordType::class, [
        'constraints' => [
            new IsUnbreachedPassword(),
        ],
        'label' => 'label.password',
        'attr' => [
            'autocomplete' => 'off',
        ],
    ]);

There is also the possibility to add a constraint assertion to a property. However, this should be used with extreme caution: Make sure to not save plaintext passwords in your database. Also, if used with a User entity, this will most likely not work, because the password property will hold a password hash.

use Jgxvx\CilicianBundle\Validator\Constraints as CilicianAssert;

// ...

/**
 * @var string
 *
 * @CilicianAssert\IsUnbreachedPassword()
 */
private $password;

Caching

If a PSR-16 compatible caching service is available under the cache alias, it will be injected into cilician to enable caching.

Logging

If a PSR-3 compatible logger is available under the logger alias, it will be injected into cilician to enable logging.

License

CilicianBundle is open source software published under the MIT license. Please refer to the LICENSE file for further information.

Contributing

Please refer to the Contribution Guidelines.

统计信息

  • 总下载量: 8.55k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-11-18