Commit Graph

3 Commits

Author SHA1 Message Date
beo3000 dc52f64ed4 feat: activate MSAL auto-login in get-token.ps1
Azure Portal config done:
- Added redirect URI: https://login.microsoftonline.com/common/oauth2/nativeclient
- Allow public client flows: Yes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 22:21:49 +01:00
beo3000 a67dc06b30 feat: set-token.ps1 + JF LANdata import script
- get-token.ps1: reads token from ~/.ka-note/token.txt, validates JWT expiry
- set-token.ps1: stores token (from arg or clipboard) to ~/.ka-note/token.txt with expiry display
- import-jf-landata.ps1: idempotent import for JF LANdata context (12 topics, 14 history entries)
- MSAL auto-login blocked by missing redirect URI in app registration (documented in get-token.ps1)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 22:18:18 +01:00
beo3000 3b6ae8c92b feat: auto token acquisition + import helpers for Ka-Note scripts
- get-token.ps1: MSAL.PS-based token acquisition (browser popup once, then cached refresh token)
- download/upload/unlock.ps1: auto-call get-token.ps1 when no -Token/-env provided
- import-helpers.ps1: reusable functions (Upsert-Context, Add-Topic, Add-HistoryEntry) with correct schema
- import-jf-sysadmins.ps1: idempotent import script using helpers

Fixes:
- Token file no longer stored in work/ (deleted on download)
- Upsert-Context resurrects soft-deleted contexts (500 was caused by uploading topics for deleted context)
- History uses topicId + YYYY-MM-DD date (not contextId + timestamp)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 22:08:12 +01:00