refactor(credentials): remove credential expiry support and API
The credential expiry feature has been removed from both the Rust backend and the frontend. Stored credentials now include only username and password. - Remove expiresAt field from StoredCredential - Simplify API by removing expiry param from credSave - Drop expiry UI and expiry checks across the app
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import type { StoredCredential } from "./types";
|
||||
|
||||
/**
|
||||
* Derives a credential key from a remote URL, scoped to host + organisation —
|
||||
* the same granularity Azure DevOps / GitHub use. Examples:
|
||||
@@ -37,13 +35,6 @@ export function orgKeyFromUrl(raw: string): string | null {
|
||||
return org ? `${host}/${org}` : host;
|
||||
}
|
||||
|
||||
/** A stored credential is expired only if it carries a past expiry date. */
|
||||
export function isCredentialExpired(cred: StoredCredential): boolean {
|
||||
if (!cred.expiresAt) return false;
|
||||
const time = new Date(cred.expiresAt).getTime();
|
||||
return !Number.isNaN(time) && time < Date.now();
|
||||
}
|
||||
|
||||
const AUTH_PREFIX = "AUTH_FAILED:";
|
||||
|
||||
export function isAuthError(message: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user