wps企业版对接统一认证 sso登录
wps对接第一步 点击校验 获取code
http://user.ms.nwnu.edu.cn/loginwps
function loginwps() { $url = $_REQUEST['redirect_url']; header("Location:".$url."&state=345c45bed5dc46e08196a9be04891921&code=123"); //确保重定向后,后续代码不会被执行 exit; }
laravel要添加路由:
Route::any('/loginwps', 'User\HomeController@loginwps'); Route::any('/access_Token', 'User\HomeController@access_Token'); Route::any('/userinfo', 'User\HomeController@userinfo');
获取company token:
开发者后台申请权限:
open.wps.cn/app-info/AK20231021OGLXQL/permission
获取dept_pid: