gringlas/cakephp-ep-authenticate 问题修复 & 功能扩展

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

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

gringlas/cakephp-ep-authenticate

Composer 安装命令:

composer require gringlas/cakephp-ep-authenticate

包简介

Authenticate Object for stateless authenticate. It can be used to get permanent authentication during development.

README 文档

README

This little plugin provides an Authenticate adapter for stateless Authentication. It allows you to specify a special header, which contains a token to authorize in your application. This can be very helpful for testing, be it unittests or manual tests with API clients (like Postman) or directly in your client software.

Installation

composer require gringlas/cakephp-ep-authenticate dev-master

Usage

Just add gringlas/EPAuthenticate.EP to your AuthComponent authenticate, like

$this->loacComponent('Auth', [
    'authenticate' => [
        'gringlas/EPAuthenticate.EP' => [
            'header' => 'EP-Authorization',
            'userId' => 1,
            'debugOnly' => false,
            'password' => 'EPme',
        ],
    ...
);

Send add set header and password to your next request and get authenticated as User with id userid.

Configuration

  • userId: Id of User data, which should be authed, defaults to 1
  • debugOnly: only use AuthenticateAdapter when env('debug', true), defaults to true
  • header: Name of header, defaults to EP-Authorization
  • password: Value of header, defaults to EPme

ToDo

  • Add custom UserModel, so far only users from DB table are supported
  • Add custom finder method, so far only a $this->User->get($this->getConfig['user']) is used to get User data.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固