定制 mkosiedowski/simple-api-key-bundle 二次开发

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

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

mkosiedowski/simple-api-key-bundle

Composer 安装命令:

composer require mkosiedowski/simple-api-key-bundle

包简介

Creates an avenue for using ApiKey app authentication for Symfony2 without user authentication

README 文档

README

Creates a firewall for using ApiKey application authentication for Symfony2.

This bundle is highly based on uecode/api-key-bundle

Installation

Requires composer, install as follows

composer require mkosiedowski/simple-api-key-bundle dev-master

Enable Bundle

Place in your AppKernel.php to enable the bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new mkosiedowski\SimpleApiKeyBundle\SimpleApiKeyBundle(),
    );
}

Configuration

You can change how the API key should be delivered and the name of the parameter its sent as. By default, this bundle looks for apiKey in the query string.

simple_api_key:
    delivery: query #or header
    parameter_name: some_value # defaults to `api_key`

Applications repository

Applications are stored in applicationKeys table by default.

You should register Doctrine Entities mapping with your doctrine configuration:

doctrine:
    orm:
        entity_managers:
            default:
                mappings:
                    SimpleApiKeyBundle:
                        type: annotation
                        dir: Entity
                        is_bundle: true

Change security settings

You can now add simple_api_key: true to any of your firewalls.

For Example:

security:
    firewalls:
        auth:
            pattern: ^/api/*
            simple_api_key: true
            stateless: true

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-11-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固