import Oidc from "oidc-client"; export const identityServerBase = localStorage.getItem('oidcLogin_url');//目标服务器登录地址 export const vueBase = window.location.origin // 参考文档 https://github.com/IdentityModel/oidc-client-js/wiki export const mgr = new Oidc.UserManager({ authority: `${identityServerBase}`, // 认证服务器 client_id: localStorage.getItem('oidcLogin_clientId'), // 表示客户端的ID,必选项 redirect_uri: `${vueBase}/callback`,// 表示重定向URI,认证服务器回调的客户端页面。可选项 response_type: `code`, scope: localStorage.getItem('oidcLogin_scopes'), // 表示申请的权限范围,可选项 post_logout_redirect_uri: `${vueBase}/home?action=logout`, automaticSilentRenew: false, // accessTokenExpiringNotificationTime: 10, // filterProtocolClaims: false, // loadUserInfo: true, // monitorSession: false, // includeIdTokenInSilentRenew : false, });