auth.clear
Clear locally stored authentication sessions and JWT tokens to reset login state and log out of the portal.
Instructions
저장된 인증 세션을 삭제한다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/auth-tools.ts:68-78 (handler)The authClear handler function that executes the auth.clear tool logic. It calls auth.logout() to clear the session and returns the authentication status.
export function authClear( auth: PortalAuthManager, sessionFile: string ): Record<string, unknown> { auth.logout(); return { authenticated: false, hasJwtToken: false, sessionFile, }; } - src/server.ts:67-72 (registration)Registration of the auth.clear tool with the MCP server. Defines the tool name, description (empty params schema), and wires it to the authClear handler.
server.tool( "auth.clear", "저장된 인증 세션을 삭제한다.", {}, () => toContent(authClear(auth, config.sessionFile)) ); - src/core/auth.ts:220-222 (helper)The logout() method in PortalAuthManager that is called by authClear. It clears the session store.
logout(): void { this.store.clear(); }