定制 sgmarketplace/slim-core 二次开发

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

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

sgmarketplace/slim-core

最新稳定版本:2.1.3

Composer 安装命令:

composer require sgmarketplace/slim-core

包简介

Core utility classes for Slim framework projects

README 文档

README

Slim core utility classes which can be re-used across microservices.

Installation

composer require sgmarketplace/slim-core

Documentation

SgSlimCore\Middleware\Json

A simple middleware that adds content-type to the response for a request that is considered an "api" request

SgSlimCore\Middleware\Auth

A simple middleware that only allows API path requests which have a valid JWT. This middleware requires a JWT service to verify logged-in status. A JWT service can be generated by using the SgSlimCore\Factory\Jwt factory.

SgSlimCore\Factory\TokenDecoder

A service factory which returns the OAuth2 library's decoder class configured with the public key (specified at $config['sg_slim_core']['jwt']['public_key_file']) opened in memory.

SgSlimCore\Factory\Jwt

A service factory which returns the OAuth2 library's decoded JWT (generated from the request's Authorization header) This factory requires the following configuration to be present on the \Slim\Slim $app level.

'sg_slim_core' => [
    'token_decoder' => 'name_of_the_token_decoder_service',
    'jwt' => [
        'public_key_file' => 'path/to/public/key.pem',
        'service_name' => 'name_of_this_service',
    ]
]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-06