MCPcopy Index your code
hub / github.com/simstudioai/sim / agiloftLogoutPinned

Function agiloftLogoutPinned

apps/sim/tools/agiloft/utils.server.ts:69–85  ·  view source on GitHub ↗
(
  instanceUrl: string,
  knowledgeBase: string,
  token: string,
  resolvedIP: string
)

Source from the content-addressed store, hash-verified

67 * not thrown.
68 */
69export async function agiloftLogoutPinned(
70 instanceUrl: string,
71 knowledgeBase: string,
72 token: string,
73 resolvedIP: string
74): Promise<void> {
75 try {
76 const base = instanceUrl.replace(/\/$/, '')
77 const kb = encodeURIComponent(knowledgeBase)
78 await secureFetchWithPinnedIP(`${base}/ewws/EWLogout?$KB=${kb}`, resolvedIP, {
79 method: 'POST',
80 headers: { Authorization: `Bearer ${token}` },
81 })
82 } catch (error) {
83 logger.warn('Agiloft logout failed (best-effort)', { error })
84 }
85}
86
87/**
88 * Shared wrapper that handles the full Agiloft auth lifecycle behind the

Callers 3

route.tsFile · 0.90
route.tsFile · 0.90
executeAgiloftRequestFunction · 0.85

Calls 3

secureFetchWithPinnedIPFunction · 0.90
replaceMethod · 0.65
warnMethod · 0.65

Tested by

no test coverage detected