mirror of
https://github.com/Gerenios/AADInternals
synced 2026-06-08 11:09:38 +00:00
Merge pull request #121 from Cloud-Architekt/master
Changed behavior for AT with wrong audience
This commit is contained in:
+3
-7
@@ -104,14 +104,10 @@ function Get-AccessTokenFromCache
|
||||
if((($tAudience -ne $tResource) -and ($Script:RESIDs[$tAudience] -ne $tResource)) -and ($Force -eq $False))
|
||||
{
|
||||
# Wrong audience
|
||||
Write-Verbose "ACCESS TOKEN HAS WRONG AUDIENCE: $tAudience. Exptected: $tResource."
|
||||
Throw "The audience of the access token ($tAudience) is wrong. Should be $tResource!"
|
||||
}
|
||||
else
|
||||
{
|
||||
# Just return the passed access token
|
||||
$retVal=$AccessToken
|
||||
Write-Warning "The audience of the access token ($tAudience) is wrong. Should be $tResource!"
|
||||
}
|
||||
# Just return the passed access token
|
||||
$retVal=$AccessToken
|
||||
}
|
||||
|
||||
# Check the expiration
|
||||
|
||||
Reference in New Issue
Block a user