Validate session snapshots and wipe keys on logout (closes #10)
check / check (push) Successful in 41s
check / check (push) Successful in 41s
Client.fromJSON checks every snapshot field and each key's decoded length and throws an error naming the bad field. toJSON reads the token through a new ApiClient.getAuthToken and throws when there is none. logout zeroes the key buffers in place; collectionsSince re-checks for logout after its request so it never decrypts with zeroed keys. The CLI now reports a corrupt session file separately from a missing one. Model: opus-5-5
This commit was merged in pull request #79.
This commit is contained in:
1 parent
3871d6228e
commit
b7d6ab99f4
7 files changed
+319
-33
No files matched your search
@@ -139,6 +139,10 @@ export class ApiClient {
|
||||
this.token = undefined;
|
||||
}
|
||||
|
||||
getAuthToken(): string | undefined {
|
||||
return this.token;
|
||||
}
|
||||
|
||||
// The policy this client was configured with, so that a caller wrapping a
|
||||
// whole operation in its own `withRetry` — the download layer — runs under
|
||||
// the same settings rather than under the library defaults.
|
||||
|
||||
Reference in new issue
Block a user