Auth_UC UCenter认证整合接口

整合 UCenter 和 MW 的认证接口,用起来还挺顺手的,叫做Auth_UC。主要负责登录、注册、同步用户信息这些事儿,说白了,就是让两个系统共用一套账号体系,做到真正的“一处登录,到处通行”。

UCenter 的用户系统比较成熟,整合到 MW 里后,用户体验提升蛮大,比如用户在 UCenter 改个密码,MW 那边也立刻生效,不用再多做同步逻辑了。你只要会点PHP,会搞点SessionHTTP 求,基本都能上手。

接口本身就是一套PHP 源码,一般打包放在Auth_UC文件夹里,里面会有些文档和测试脚本。你要整合的话,建议先通读下文档,再根据你 MW 系统的结构来改。多时候还得动 MW 的登录逻辑,比如用curl去求 UCenter 的验证接口,拿到结果再自动登录。

同步信息也不麻烦,像是昵称、邮箱这种字段,接口里都好了。你在 MW 那边加几个触发更新的 Hook 就完事儿。如果你想更进一步,比如整合权限控制,也能做到,UCenter 那边封账号,MW 会自动禁用,权限联动方便。

哦对了,整合过程中难免会踩坑,尤其是编码格式、Session 跨域啥的,有问题可以去 UCenter 社区或者看下他们文档,经验贴还挺多的。如果你手上正好是 PHP 栈的项目,又在搞多个系统的单点登录,强烈推荐你试试这套接口,靠谱!

zip
Auth_UC.zip 预估大小:37个文件
folder
Auth_UC 文件夹
folder
uc_client 文件夹
folder
control 文件夹
file
user.php 8KB
file
friend.php 1KB
file
cache.php 473B
file
feed.php 4KB
file
pm.php 8KB
file
index.htm 1B
file
mail.php 993B
file
domain.php 511B
file
tag.php 2KB
file
app.php 925B
file
client.php 19KB
folder
data 文件夹
folder
cache 文件夹
folder
index.htm 文件夹
file
apps.php 2KB
file
settings.php 707B
folder
index.htm 文件夹
folder
model 文件夹
file
user.php 7KB
file
friend.php 3KB
file
cache.php 2KB
file
misc.php 4KB
file
pm.php 16KB
file
note.php 6KB
file
index.htm 1B
file
mail.php 5KB
file
domain.php 1KB
file
tag.php 2KB
file
app.php 783B
file
base.php 6KB
file
index.htm 1B
folder
lib 文件夹
file
db.class.php 4KB
file
xml.class.php 3KB
file
sendmail.inc.php 5KB
file
index.htm 1B
file
uccode.class.php 5KB
folder
include 文件夹
file
db_mysql.class.php 3KB
folder
api 文件夹
file
uc.php 11KB
file
config.inc.php 1KB
file
Auth_UCenter.php 19KB
zip 文件大小:50.73KB