teamgantt/user-sync 问题修复 & 功能扩展

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

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

teamgantt/user-sync

最新稳定版本:v2.0.0

Composer 安装命令:

composer require teamgantt/user-sync

包简介

Sync user data with external stores

README 文档

README

Sync user data with external stores.

Currently includes support for the following remote stores:

usage

Currently deals in syncing passwords and email addresses. This is for use cases that may require it, though the typical use case does not involve syncing passwords. The case for syncing a password may make sense during a period of migration or phasing out local storage of passwords.

Users can be deleted by constructing a SyncRequestInterface whose getAction method returns the string literal 'delete'.

Supported actions are 'update' and 'delete'.

SyncInterface exposes a contract for PHP invokable classes, and looks like this:

public function __invoke(SyncableUserInterface $user, SyncRequestInterface $request);

There is a default implementation of SyncRequestInterface included as SyncRequest.

use TeamGantt\UserSync\SyncRequest;
use TeamGantt\UserSync\CognitoSync;

$args = []; // see CognitoSync for required arguments - note: requires aws/aws-sdk-php
$sync = new CognitoSync(...$args);

// note that all params to SyncRequest are optional. Syncing will or will not happen depending on what is given
$request = SyncRequest::fromArray(['password' => 'newcleartextpassword', 'email_address' => 'newemail@email.com', 'action' => 'update']);
$user = ExampleUserRepository::fetch($userId); // $user can be any object that implements the included SyncableUserInterface
$sync($user, $request); // tada!

testing

$ composer test

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固