mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23:25:24 +00:00
feat: move opkssh and warpgate into plugins (C3)
This commit is contained in:
1 parent
925da4a661
commit
98d367d7e2
336 files changed
+22380
-4746
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import type { PluginContext } from "@termix/plugin-sdk/backend";
|
||||
import { detectWarpgateRound } from "./detect.js";
|
||||
import { hostImportNormalizer } from "./host-import.js";
|
||||
|
||||
export const HANDLER_ID = "warpgate";
|
||||
|
||||
export async function activate(ctx: PluginContext) {
|
||||
ctx.auth.registerKeyboardInteractiveHandler({
|
||||
id: HANDLER_ID,
|
||||
label: "Warpgate",
|
||||
detect: (round) => detectWarpgateRound(round),
|
||||
// Warpgate asks for the password before its browser round; answer it
|
||||
// silently so the only thing the user sees is the sign-in dialog.
|
||||
autoAnswerPasswords: (_host, settings) => settings.useWarpgate === true,
|
||||
});
|
||||
|
||||
ctx.registry.provide("warpgate.hostImportNormalizer", hostImportNormalizer);
|
||||
}
|
||||
|
||||
export async function deactivate() {
|
||||
// Registered through ctx, so core removes it.
|
||||
}
|
||||
Reference in new issue
Block a user