| | |
| | | import request from '@/config/axios' |
| | | |
| | | export interface OAuth2TokenVO { |
| | | id: number |
| | | accessToken: string |
| | | refreshToken: string |
| | | userId: number |
| | | userType: number |
| | | clientId: string |
| | | createTime: Date |
| | | expiresTime: Date |
| | | grantType: string |
| | | scope: string |
| | | refreshToken: any |
| | | username: string |
| | | password: string |
| | | redirectUri: string |
| | | } |
| | | |
| | | // 查询 token列表 |
| | |
| | | return request.get({ url: '/system/oauth2-token/page', params }) |
| | | } |
| | | |
| | | // 单点登录授权 |
| | | export const OAuth2Login = (params: OAuth2TokenVO) => { |
| | | return request.post({ url: '/system/oauth2/token', data: params }) |
| | | } |
| | | |
| | | // 删除 token |
| | | export const deleteAccessToken = (accessToken: string) => { |
| | | return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) |