承接 winwin/omniauth 相关项目开发

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

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

winwin/omniauth

Composer 安装命令:

composer create-project winwin/omniauth

包简介

README 文档

README

Omniauth is a middleware for multi-provider authentication inspired by Opauth.

How to use it?

Check out and see examples to find how it work.

Configuration

The constructor of the Omniauth class has serval options to control its behavior.

strategies

An array of configuration for authentication providers. The key is the provider name and also will be used for route match, and the value will be the contructor parameters for the strategy.

The common configuration key for the strategy is strategy_class,which also can set by call:

<?php
$omniauth->getStrategyFactory()->register($providerName, $strategyClass);

route

A pattern to match which uri will do the authentication. The default value is /:strategy/:action. The :strategy place holder will expand to an regexp match all provider name listed in strategies configuration, and the :action place holder will match nothing or any word.

auth_key

The key name to save user identity in $_SESSION array. The default value is 'auth'

auto_login

If value is true, omniauth will check current user whether is logged in (by check $_SESSION['auth'] is not empty), if not, it will redirect user to the default login page. The default value is true.

redirect_uri_key

The key name to save current page before redirect user to login page in $_SESSION array and when user login successfully, omniauth will redirect user to the saved page. The default value is login_redirect_uri.

identity_transformer

A function to transformer user identity before save to session.

How to add my authentication strategy?

Check out PasswordStrategy to see how to implements an new authentication strategy.

Usually, a strategy should extends AbstractStrategy and have to implement two function authenticate and verify. The authenticate function initiate the authentication flow, and the verify function will check user's credential and call $this->login($user) to set user identity and return back the page before login.

winwin/omniauth 适用场景与选型建议

winwin/omniauth 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.15k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 winwin/omniauth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 winwin/omniauth 我们能提供哪些服务?
定制开发 / 二次开发

基于 winwin/omniauth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-15