oauth-client-config_20220127091537.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // 开发环境
  2. const oauthConfig = {
  3. authority: "http://localhost:5666",
  4. client_id: "Dashboard",
  5. redirect_uri: "http://localhost:5500/callback.html",
  6. response_type: "id_token token",
  7. scope: "openid profile eapapi offline_access",
  8. post_logout_redirect_uri: "http://localhost:5500/pages/macstatus.html",
  9. silent_redirect_uri: "http://localhost:5500/silentref.html",
  10. automaticSilentRenew: true,
  11. };
  12. // 测试环境
  13. // const oauthConfig = {
  14. // authority: "https://eap.ofilm.com:7878",
  15. // client_id: "Dashboard",
  16. // redirect_uri: "https://eap.ofilm.com:7766/callback.html",
  17. // response_type: "id_token token",
  18. // scope: "openid profile eapapi offline_access",
  19. // post_logout_redirect_uri: "https://eap.ofilm.com:7766/pages/macstatus.html",
  20. // silent_redirect_uri: "https://eap.ofilm.com:7766/silentref.html",
  21. // automaticSilentRenew: true,
  22. // };
  23. //正式环境
  24. // const oauthConfig = {
  25. // authority: "https://eap.ofilm.com:6868",
  26. // client_id: "Dashboard",
  27. // redirect_uri: "https://eap.ofilm.com:9966/callback.html",
  28. // response_type: "id_token token",
  29. // scope: "openid profile eapapi offline_access",
  30. // post_logout_redirect_uri: "https://eap.ofilm.com:9966/pages/macstatus.html",
  31. // silent_redirect_uri: "https://eap.ofilm.com:9966/silentref.html",
  32. // automaticSilentRenew: true,
  33. // };
  34. function strRandom(length) {
  35. let result = "";
  36. const characters =
  37. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  38. const charactersLength = characters.length;
  39. for (let i = 0; i < length; i++) {
  40. result += characters.charAt(Math.floor(Math.random() * charactersLength));
  41. }
  42. return result;
  43. }