Commit 02f7618
fix: clear token cache on set_azure_cli to prevent stale cross-tenant tokens
When transitioning from no stored tenant to a stored tenant, set_tenant()
did not call logout() (only triggers on tenant mismatch). This left stale
cached tokens from the previous no-tenant session. Now set_azure_cli()
always clears _azure_cli_token_cache at the start of every login.
Adds regression test verifying cache is cleared on no-tenant → tenant-B.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent f560488 commit 02f7618
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
439 | 442 | | |
440 | 443 | | |
441 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
545 | 568 | | |
546 | 569 | | |
547 | 570 | | |
| |||
0 commit comments