定制 lasso/oauth2-client-bundle 二次开发

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

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

lasso/oauth2-client-bundle

Composer 安装命令:

composer require lasso/oauth2-client-bundle

包简介

Access APIs protected by the oauth2 authentication scheme

README 文档

README

#LassoOauth2ClientBundle

We needed to authenticate against an Oauth2 API using simple 2-legged Bearer-Token authentication. But most of the Oauth2 clients we found were written for 3-legged authentication, or provided minimal functionality, didn't integrate with Symfony well or had other drawbacks.

We decided to write a very simple wrapper around the popular Buzz Browser using the Buzz Browser Bundle. Our client simply retrieves an oauth2 access token and injects it into the header of requests and hands them off to the Buzz Browser.

##Usage

Pass your authentication credentials into the constructor of the Token class. It also needs a reference to a normal instance of the buzz browser to retrieve a token.

Then pass the token instance and an instance of the buzz browser to the Client class. You can use the client class like the buzz browser, with all public functions being available.

##Drawbacks

Only the Bearer-Token authentication is supported, as it fulfills our needs - but it's a very simple and less secure method than the HMAC authentication scheme also supported by oauth2. An extension of this bundle to support HMAC would be nice, but is not a high priority for us.

Three-legged authentication is not supported and not the intend of this bundle. If you wish to use three legged authentication, you should probably look at other clients. If you insist on using this bundle, you would have to implement your own authentication mechanism to retrieve an authentication token. You could then write your own Token class which has the public method 'getToken()', and pass that into the client constructor.

Build Status

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2013-02-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固