Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions clients/shared/App/Auth/GuardianTokenFileReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,24 +188,6 @@ public enum GuardianTokenFileReader {
: .importValid(creds)
}

/// Deletes any CLI-persisted guardian token on disk for the given
/// assistant. Used by forced re-bootstrap paths to avoid re-importing a
/// stale/revoked token that shares the same file. A missing file is
/// treated as success.
@discardableResult
public static func deleteTokenFile(assistantId: String) -> Bool {
let path = guardianTokenPath(for: assistantId, paths: VellumPaths.current)
guard FileManager.default.fileExists(atPath: path) else { return true }
do {
try FileManager.default.removeItem(atPath: path)
log.info("Deleted guardian token file at \(path, privacy: .public)")
return true
} catch {
log.warning("Failed to delete guardian token file at \(path, privacy: .public): \(error.localizedDescription, privacy: .public)")
return false
}
}

/// Deletes the guardian-token file for the given assistant across every
/// `VellumEnvironment`'s config dir.
///
Expand Down