feat(auth): 统一身份 - 增加可选IAM快捷登录并保留原业务权限
This commit is contained in:
@@ -45,3 +45,16 @@ export function unbindWorkWechat() {
|
||||
export function changeFirstPassword(params: { password: string; password_confirm: string }) {
|
||||
return request.post({ url: '/login/changeFirstPassword', params })
|
||||
}
|
||||
|
||||
// 统一账号登录开关和服务器生成的固定登录入口
|
||||
export function getIamConfig() {
|
||||
return request.get({ url: '/iam/config' }, { withToken: false })
|
||||
}
|
||||
|
||||
// 浏览器绑定的一次性兑换码;不重试,也不将旧业务 token 带入认证
|
||||
export function iamLogin(ticket: string) {
|
||||
return request.post(
|
||||
{ url: '/iam/exchange', params: { ticket, terminal: config.terminal }, withCredentials: true },
|
||||
{ withToken: false, isOpenRetry: false }
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user