承接 mle86/request-authentication 相关项目开发

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

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

mle86/request-authentication

Composer 安装命令:

composer require mle86/request-authentication

包简介

A simple library for API request authentication.

README 文档

README

Build Status Coverage Status Latest Stable Version PHP 7.1 License

This PHP library provides a generic interface for authenticating outbound API requests and for verifying inbound API requests' authentication.

It is released under the MIT License.

Installation

Via Composer: $ composer require mle86/request-authentication

Or insert this into your project's composer.json file:

"require": {
    "mle86/request-authentication": "^0"
}

Dependencies and Minimum PHP Version

Workflow

This library contains several AuthenticationMethod classes.

Each of those represents one mechanism for request authentication and verification. The BasicAuthenticationMethod for example adds an Authorization: Basic … HTTP header to outbound requests and verifies that header in inbound requests against a list of known usernames and their passwords.

Usually the AuthenticationMethod classes won't be used directly (apart from instantiating them), there's the RequestAuthenticator and RequestVerifier wrapper classes instead that take an AuthenticationMethod dependency.

To sign/authenticate an outbound request you'll need an AuthenticationMethod instance wrapped in a RequestAuthenticator instance, a client ID and a client secret, and the request to sign. The authenticate() method will add the required authentication headers to the request so that it can be sent.

To verify an inbound request you'll need an AuthenticationMethod instance of the same class wrapped in a RequestVerifier instance and a KeyRepository that will map the request's client ID to the same client secret used for signing the request.
(In case of the PublicKeyMethod class, the client will use its private key for signing and the KeyRepository must return the client's public key.)

Classes and Interfaces

More Documentation

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固