refactor: drop PAM auth and require password for funnel
This commit is contained in:
@@ -48,7 +48,7 @@ export type EventLogEntry = {
|
||||
};
|
||||
|
||||
export type AppViewState = {
|
||||
settings: { gatewayUrl: string; token: string; username: string; sessionKey: string };
|
||||
settings: { gatewayUrl: string; token: string; sessionKey: string };
|
||||
password: string;
|
||||
tab: Tab;
|
||||
connected: boolean;
|
||||
|
||||
@@ -188,9 +188,6 @@ export class ClawdisApp extends LitElement {
|
||||
this.client = new GatewayBrowserClient({
|
||||
url: this.settings.gatewayUrl,
|
||||
token: this.settings.token.trim() ? this.settings.token : undefined,
|
||||
username: this.settings.username.trim()
|
||||
? this.settings.username.trim()
|
||||
: undefined,
|
||||
password: this.password.trim() ? this.password : undefined,
|
||||
clientName: "clawdis-control-ui",
|
||||
mode: "webchat",
|
||||
|
||||
@@ -30,7 +30,6 @@ type Pending = {
|
||||
export type GatewayBrowserClientOptions = {
|
||||
url: string;
|
||||
token?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
clientName?: string;
|
||||
clientVersion?: string;
|
||||
@@ -99,10 +98,9 @@ export class GatewayBrowserClient {
|
||||
|
||||
private sendConnect() {
|
||||
const auth =
|
||||
this.opts.token || this.opts.password || this.opts.username
|
||||
this.opts.token || this.opts.password
|
||||
? {
|
||||
token: this.opts.token,
|
||||
username: this.opts.username,
|
||||
password: this.opts.password,
|
||||
}
|
||||
: undefined;
|
||||
|
||||
@@ -3,7 +3,6 @@ const KEY = "clawdis.control.settings.v1";
|
||||
export type UiSettings = {
|
||||
gatewayUrl: string;
|
||||
token: string;
|
||||
username: string;
|
||||
sessionKey: string;
|
||||
};
|
||||
|
||||
@@ -16,7 +15,6 @@ export function loadSettings(): UiSettings {
|
||||
const defaults: UiSettings = {
|
||||
gatewayUrl: defaultUrl,
|
||||
token: "",
|
||||
username: "",
|
||||
sessionKey: "main",
|
||||
};
|
||||
|
||||
@@ -30,8 +28,6 @@ export function loadSettings(): UiSettings {
|
||||
? parsed.gatewayUrl.trim()
|
||||
: defaults.gatewayUrl,
|
||||
token: typeof parsed.token === "string" ? parsed.token : defaults.token,
|
||||
username:
|
||||
typeof parsed.username === "string" ? parsed.username : defaults.username,
|
||||
sessionKey:
|
||||
typeof parsed.sessionKey === "string" && parsed.sessionKey.trim()
|
||||
? parsed.sessionKey.trim()
|
||||
|
||||
@@ -59,17 +59,6 @@ export function renderOverview(props: OverviewProps) {
|
||||
placeholder="CLAWDIS_GATEWAY_TOKEN"
|
||||
/>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>Username (system auth)</span>
|
||||
<input
|
||||
.value=${props.settings.username}
|
||||
@input=${(e: Event) => {
|
||||
const v = (e.target as HTMLInputElement).value;
|
||||
props.onSettingsChange({ ...props.settings, username: v });
|
||||
}}
|
||||
placeholder="optional"
|
||||
/>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>Password (not stored)</span>
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user