From a28b6cd3b146104124afb80d235a741f838e6580 Mon Sep 17 00:00:00 2001 From: Pete Maan Date: Tue, 13 Oct 2026 20:14:05 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=91=20Report=20session=20expiry=20?= =?UTF-8?q?on=20401=20with=20an=20expired=20token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Invoke-IDRestMethod decodes exp from the WebSession's Authorization header when a request returns 401. An expired token reports the expiry time and directs the user to New-IDSession or New-IDPlatformToken; every other 401 is unchanged. --- CHANGELOG.md | 6 ++- .../Private/Invoke-IDRestMethod.ps1 | 15 +++++++ Tests/Invoke-IDRestMethod.Tests.ps1 | 44 +++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0bebf6..455d318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file. ## Unreleased -- N/A +### Changed + +- A request refused with 401 because the session token has expired now reports `Session expired at