parent
134da411c7
commit
3df9a5e8fd
|
@ -7,6 +7,21 @@ if (!defined('__TYPECHO_ROOT_DIR__')) {
|
|||
class QuickAuthLogin_Action extends Typecho_Widget
|
||||
{
|
||||
|
||||
/* 测试插件安装接口 */
|
||||
public function ping(){
|
||||
$version = Typecho_Cookie::get('__typecho_check_version');
|
||||
$data = [
|
||||
"code" => 0,
|
||||
"msg" => "pong",
|
||||
"data" => [
|
||||
"name" => "QuickAuthLogin For Typecho",
|
||||
"version" => QuickAuthLogin_Plugin::PLUGIN_VERSION
|
||||
]
|
||||
];
|
||||
$res = new Typecho_Response();
|
||||
$res->throwJson($data);
|
||||
}
|
||||
|
||||
/* 重置当前用户绑定数据 */
|
||||
public function reset()
|
||||
{
|
||||
|
|
|
@ -4,13 +4,14 @@
|
|||
*
|
||||
* @package QuickAuthLogin
|
||||
* @author wixy
|
||||
* @version 0.9.1
|
||||
* @link https://blog.wixy.cn/archives/quickauthlogin.html
|
||||
* @version 0.9.2
|
||||
* @link https://blog.wixy.cn
|
||||
*/
|
||||
|
||||
class QuickAuthLogin_Plugin implements Typecho_Plugin_Interface {
|
||||
|
||||
const PLUGIN_NAME = 'QuickAuthLogin';
|
||||
const PLUGIN_VERSION = '0.9.2';
|
||||
const PLUGIN_PATH = __TYPECHO_ROOT_DIR__.__TYPECHO_PLUGIN_DIR__.'/QuickAuthLogin/';
|
||||
|
||||
/**
|
||||
|
@ -27,6 +28,7 @@ class QuickAuthLogin_Plugin implements Typecho_Plugin_Interface {
|
|||
Helper::addPanel(1, 'QuickAuthLogin/views/authbind.php', '微信账号绑定', '微信账号绑定', 'subscriber');
|
||||
Helper::addRoute('wechatlogin',__TYPECHO_ADMIN_DIR__.'QuickAuthLogin/wechatlogin','QuickAuthLogin_Action','wechatlogin');
|
||||
Helper::addRoute('reset',__TYPECHO_ADMIN_DIR__.'QuickAuthLogin/reset','QuickAuthLogin_Action','reset');
|
||||
Helper::addRoute('ping',__TYPECHO_ADMIN_DIR__.'QuickAuthLogin/ping','QuickAuthLogin_Action','ping');
|
||||
}
|
||||
|
||||
public static function updateDb()
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
#### 更新记录
|
||||
|
||||
##### 2022/03/31 v0.9.2
|
||||
|
||||
1. 支持QuickAuth平台测试功能,可测试插件是否安装成功
|
||||
2. 更新接入教程
|
||||
|
||||
##### 2022/03/07 v0.9.1
|
||||
|
||||
1. 取消替换登录界面功能,改为在源登录界面注入微信登录按钮
|
||||
|
@ -33,17 +38,11 @@ Github: [https://github.com/mr-wixy/QuickAuthLogin](https://github.com/mr-wixy/Q
|
|||
|
||||
第 4 步:登录QuickAuth网站创建接入应用;
|
||||
|
||||
![](https://cdn.wixy.cn/blog-picture/blog-picture20220127160420.png)
|
||||
|
||||
<br/>
|
||||
|
||||
第 5 步:填写应用的基本信息(注意:此时可以获取到AppKey,回调地址请填写自己博客的域名+/index.php/admin/QuickAuthLogin/wechatlogin 此处必须为https)
|
||||
|
||||
![](https://cdn.wixy.cn/blog-picture/blog-picture20220127160707.png)
|
||||
![建接入应用](https://cdn.wixy.cn/blog-picture/20220407133031.png)
|
||||
|
||||
第 6 步:发布应用;
|
||||
|
||||
![发布应用](https://cdn.wixy.cn/blog-picture/blog-picture20220127161055.png)
|
||||
![发布应用](https://cdn.wixy.cn/blog-picture/20220407133237.png)
|
||||
|
||||
第 7 步:[获取](https://qauth.cn/config/secret)UserSecretKey;
|
||||
|
||||
|
|
Loading…
Reference in New Issue