mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 19:51:56 +08:00
移除 OAuth2 改为 Redis
This commit is contained in:
@@ -6,21 +6,18 @@ const scope = 'server'
|
||||
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid) {
|
||||
const grant_type = 'password'
|
||||
return request({
|
||||
url: '/auth/oauth/token',
|
||||
url: '/auth/login',
|
||||
method: 'post',
|
||||
params: { username, password, code, uuid, client_id, client_secret, grant_type, scope }
|
||||
data: { username, password, code, uuid }
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新方法
|
||||
export function refreshToken(refresh_token) {
|
||||
const grant_type = 'refresh_token'
|
||||
export function refreshToken() {
|
||||
return request({
|
||||
url: '/auth/oauth/token',
|
||||
method: 'post',
|
||||
params: { client_id, client_secret, grant_type, scope, refresh_token }
|
||||
url: '/auth/refresh',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -35,7 +32,7 @@ export function getInfo() {
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/auth/token/logout',
|
||||
url: '/auth/logout',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询终端配置列表
|
||||
export function listClient(query) {
|
||||
return request({
|
||||
url: '/system/client/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询终端配置详细
|
||||
export function getClient(clientId) {
|
||||
return request({
|
||||
url: '/system/client/' + clientId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增终端配置
|
||||
export function addClient(data) {
|
||||
return request({
|
||||
url: '/system/client',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改终端配置
|
||||
export function updateClient(data) {
|
||||
return request({
|
||||
url: '/system/client',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除终端配置
|
||||
export function delClient(clientId) {
|
||||
return request({
|
||||
url: '/system/client/' + clientId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user