完善SSO单点登录

This commit is contained in:
puhui999
2023-04-07 10:15:21 +08:00
parent 2d019f1bf9
commit e22363d061
4 changed files with 43 additions and 42 deletions

View File

@ -76,7 +76,14 @@ export const reqCheckApi = (data) => {
}
// ========== OAUTH 2.0 相关 ==========
export type scopesType = string[]
export interface paramsType {
responseType: string
clientId: string
redirectUri: string
state: string
scopes: scopesType
}
export const getAuthorize = (clientId) => {
return request.get({ url: '/system/oauth2/authorize?clientId=' + clientId })
}
@ -87,8 +94,8 @@ export function authorize(
redirectUri: string,
state: string,
autoApprove: boolean,
checkedScopes: any,
uncheckedScopes: any
checkedScopes: scopesType,
uncheckedScopes: scopesType
) {
// 构建 scopes
const scopes = {}