clone code
This commit is contained in:
parent
c9597d1e38
commit
d57bcd1719
362 changed files with 104804 additions and 0 deletions
23
src/plugins/keycloak.ts
Normal file
23
src/plugins/keycloak.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* front connect to keycloak
|
||||
*/
|
||||
import Keycloak from "keycloak-js";
|
||||
// import config from "../app.config";
|
||||
// import http from "../shared/http";
|
||||
// import router from "../router";
|
||||
|
||||
const initOptions = {
|
||||
// url: "https://keycloak.frappet.synology.me/auth/",
|
||||
realm: "bma-ehr",
|
||||
clientId: "bma-ehr-vue3",
|
||||
url: "https://identity.frappet.com/",
|
||||
// realm: "bma-ehr-exam",
|
||||
// clientId: "bma-ehr-exam-vue3",
|
||||
}; //option keycloak ที่จะ connect
|
||||
|
||||
const keycloak = Keycloak(initOptions);
|
||||
|
||||
keycloak.onAuthSuccess = () => {}; //เพิ่มlogin สำเร็จจะมาทำฟังก์ชันนี้
|
||||
|
||||
await keycloak.init({ checkLoginIframe: false }); //ทำการ connect keycloak
|
||||
export default keycloak;
|
||||
Loading…
Add table
Add a link
Reference in a new issue