enterprise/providers/rac: connection token management (#8467)

This commit is contained in:
Jens L
2024-02-14 18:57:11 +01:00
committed by GitHub
parent c048f4a356
commit 4733778460
23 changed files with 846 additions and 98 deletions

View File

@ -1,3 +1,4 @@
import { EVENT_REFRESH_ENTERPRISE } from "@goauthentik/app/common/constants";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { brand, config } from "@goauthentik/common/api/config";
import { UIConfig, uiConfig } from "@goauthentik/common/ui/config";
@ -109,8 +110,16 @@ export class EnterpriseAwareInterface extends Interface {
constructor() {
super();
new EnterpriseApi(DEFAULT_CONFIG).enterpriseLicenseSummaryRetrieve().then((enterprise) => {
this.licenseSummary = enterprise;
const refreshStatus = () => {
new EnterpriseApi(DEFAULT_CONFIG)
.enterpriseLicenseSummaryRetrieve()
.then((enterprise) => {
this.licenseSummary = enterprise;
});
};
refreshStatus();
window.addEventListener(EVENT_REFRESH_ENTERPRISE, () => {
refreshStatus();
});
}
}