mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 07:20:56 +00:00
增加获取证书接口
This commit is contained in:
parent
ea2250d002
commit
234724abb6
@ -104,7 +104,13 @@ class Login extends AuthController
|
||||
}
|
||||
|
||||
$this->validate(['account' => $account, 'pwd' => $password], \app\adminapi\validate\setting\SystemAdminValidata::class, 'get');
|
||||
$password = $rsa->privateDecrypt($password);
|
||||
|
||||
try {
|
||||
$password = $rsa->privateDecrypt($password);
|
||||
} catch (\Throwable $e) {
|
||||
return app('json')->fail($e->getMessage());
|
||||
}
|
||||
|
||||
$result = $this->services->login($account, $password, 'admin', $key);
|
||||
if (!$result) {
|
||||
$num = CacheService::get('login_captcha', 1);
|
||||
|
||||
@ -24,6 +24,8 @@ Route::group(function () {
|
||||
Route::post('login', 'Login/login')->name('AdminLogin')->option(['real_name' => '下载表备份记录']);
|
||||
//后台登录页面数据
|
||||
Route::get('login/info', 'Login/info')->option(['real_name' => '登录信息']);
|
||||
//获取公钥证书信息
|
||||
Route::get('login/key', 'Login/key')->option(['real_name' => '获取公钥证书信息']);
|
||||
//下载文件
|
||||
Route::get('download/:key', 'PublicController/download')->option(['real_name' => '下载文件']);
|
||||
//验证码
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user