定制 francodacosta/caparica-bundle 二次开发

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

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

francodacosta/caparica-bundle

Composer 安装命令:

composer require francodacosta/caparica-bundle

包简介

a symfony bundle to help secure your REST api with signed requests

README 文档

README

Build Status Total Downloads Latest Stable Version

Getting started with Caparica Bundle

Instalation

1. Download CaparicaBundle using composer
2. Enable the Bundle
3. add a client
4. Configure your controller

Step1: Download CaparicaBundle using composer

Add CaparicaBundle by running the command:

$ php composer.phar require francodacosta/caparica-bundle '~1.0'

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Francodacosta\CaparicaBundle\FrancodacostaCaparicaBundle(),
    );
}

Step 3: Configure a client

So that the server can verify the client signature it needs to know the client/api id and secret

If using the YamlClientProvider edit the file : app/config/caparica.yml

client_alias:
    code: "the client code"
    secret: "the client api secret"

add the following to your app/config.yml file

francodacosta_caparica:
    client_provider_id: francodacosta.caparica.client.provider.yaml

Step 4: Configure your controller

Make sure you controller implements the Francodacosta\CaparicaBundle\Controller\CaparicaControllerInterface. The Francodacosta\CaparicaBundle\Controller\CaparicaController extends the Symfony controller and has some handy methods.

and that's it all controller actions accessed via a route will have to be signed

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-12-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固