visto9259/lmcuser-api-tools-auth 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

visto9259/lmcuser-api-tools-auth

Composer 安装命令:

composer require visto9259/lmcuser-api-tools-auth

包简介

LmcUser Authentication for Laminas Api Tools

README 文档

README

This is a Laminas Api Tools authentication adapter that uses the LmcUser authentication service. This adapter is used with the api-tools-mvc-auth module. It allows to use the LmcUser authentication service for an API service. This is useful when adding a Laminas API Tools service to an application that uses LmcUser for user authentication.

A use case would be when an application's front-end code uses API calls to the same domain address without needing to supply user credentials with the API request. If the user is authenticated to the website, the adapter will return a AuthenticatedIdentity with the User Entity provided by the LmcUser Authentication Service, otherwise a GuestIdentity is returned.

Requirements

See the content of composer.json for dependencies.

Installation

Using Composer

$ composer require visto9259/lmcuser-api-tools-auth

Configuration

Please refer to the Api Tools Laminas MVC Auth module reference for details on how to add a custom adapter since the Api Tools Admin user interface does not support custom adapters.

In your config files, either local.php, global.php or another autoload config file, add the entry to api-tools-mvc-auth:

'api-tools-mvc-auth' => [
   'authentication' => [
      'adapters' => [
         'myLmcUserAuth' => [
            'adapter' => '\LmcUserApiToolsAuth\Adapter\AuthAdapter',
            'options' => [
                'authentication_service' => 'lmcuser_auth_service',
            ],
        ],
      ],
   ], 
]

Once the authentication adapter is added to the config file, you can use it to define the authentication type to use in the your service via the Api Tools Admin user interface. It will appear as (using the above example) myLmcUserAuth (oauth2).

You can also configure it manually in the api-tools-mvc-auth config key:

'api-tools-mvc-auth' => [
   'authentication' => [
      'map' => [
        'MyApiService' => 'myLmcUserAuth',
      ],
   ], 
]

Issues

Please submit questions and issues here.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固