29 lines
755 B
JavaScript
29 lines
755 B
JavaScript
import Resource from "./resource.js";
|
|
export class Cache extends Resource {
|
|
clearUserCache = this.makeRequest({
|
|
method: "POST",
|
|
path: "/clear-user-cache",
|
|
});
|
|
clearKeysCache = this.makeRequest({
|
|
method: "POST",
|
|
path: "/clear-keys-cache",
|
|
});
|
|
clearCrlCache = this.makeRequest({
|
|
method: "POST",
|
|
path: "/clear-crl-cache",
|
|
});
|
|
clearRealmCache = this.makeRequest({
|
|
method: "POST",
|
|
path: "/clear-realm-cache",
|
|
});
|
|
constructor(client) {
|
|
super(client, {
|
|
path: "/admin/realms/{realm}",
|
|
getUrlParams: () => ({
|
|
realm: client.realmName,
|
|
}),
|
|
getBaseUrl: () => client.baseUrl,
|
|
});
|
|
}
|
|
}
|