mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-12 10:05:07 +08:00
refactor: oauth2 vxe
This commit is contained in:
@ -1,5 +1,24 @@
|
||||
import request from '@/config/axios'
|
||||
import { OAuth2ClientVo } from './client.types'
|
||||
export interface OAuth2ClientVO {
|
||||
id: number
|
||||
clientId: string
|
||||
secret: string
|
||||
name: string
|
||||
logo: string
|
||||
description: string
|
||||
status: number
|
||||
accessTokenValiditySeconds: number
|
||||
refreshTokenValiditySeconds: number
|
||||
redirectUris: string[]
|
||||
autoApprove: boolean
|
||||
authorizedGrantTypes: string[]
|
||||
scopes: string[]
|
||||
authorities: string[]
|
||||
resourceIds: string[]
|
||||
additionalInformation: string
|
||||
isAdditionalInformationJson: boolean
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 查询 OAuth2列表
|
||||
export const getOAuth2ClientPageApi = (params) => {
|
||||
@ -12,12 +31,12 @@ export const getOAuth2ClientApi = (id: number) => {
|
||||
}
|
||||
|
||||
// 新增 OAuth2
|
||||
export const createOAuth2ClientApi = (data: OAuth2ClientVo) => {
|
||||
export const createOAuth2ClientApi = (data: OAuth2ClientVO) => {
|
||||
return request.post({ url: '/system/oauth2-client/create', data })
|
||||
}
|
||||
|
||||
// 修改 OAuth2
|
||||
export const updateOAuth2ClientApi = (data: OAuth2ClientVo) => {
|
||||
export const updateOAuth2ClientApi = (data: OAuth2ClientVO) => {
|
||||
return request.put({ url: '/system/oauth2-client/update', data })
|
||||
}
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
export type OAuth2ClientVo = {
|
||||
id: number
|
||||
clientId: string
|
||||
secret: string
|
||||
name: string
|
||||
logo: string
|
||||
description: string
|
||||
status: number
|
||||
accessTokenValiditySeconds: number
|
||||
refreshTokenValiditySeconds: number
|
||||
redirectUris: string[]
|
||||
autoApprove: boolean
|
||||
authorizedGrantTypes: string[]
|
||||
scopes: string[]
|
||||
authorities: string[]
|
||||
resourceIds: string[]
|
||||
additionalInformation: string
|
||||
isAdditionalInformationJson: boolean
|
||||
createTime: string
|
||||
}
|
@ -1,7 +1,24 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface OAuth2TokenVO {
|
||||
id: number
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
userId: number
|
||||
userType: number
|
||||
clientId: string
|
||||
createTime: string
|
||||
expiresTime: string
|
||||
}
|
||||
|
||||
export interface OAuth2TokenPageReqVO extends BasePage {
|
||||
code?: string
|
||||
name?: string
|
||||
status?: number
|
||||
}
|
||||
|
||||
// 查询 token列表
|
||||
export const getAccessTokenPageApi = (params) => {
|
||||
export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => {
|
||||
return request.get({ url: '/system/oauth2-token/page', params })
|
||||
}
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
export type OAuth2TokenVo = {
|
||||
id: number
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
userId: number
|
||||
userType: number
|
||||
clientId: string
|
||||
createTime: string
|
||||
expiresTime: string
|
||||
}
|
Reference in New Issue
Block a user