Skip to content

Commit

Permalink
Freddydk/renewauth (#3767)
Browse files Browse the repository at this point in the history
Renew federated token when access token needs renewal (works only on
GitHub)

---------

Co-authored-by: freddydk <[email protected]>
  • Loading branch information
freddydk and freddydk authored Nov 21, 2024
1 parent 08e2f35 commit 0f49ca8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Auth/Renew-BcAuthContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ try {
$bcAuthContext
}
else {
if ($bcAuthContext.ContainsKey('clientAssertion') -and "$ENV:ACTIONS_ID_TOKEN_REQUEST_TOKEN" -ne "" -and "$ENV:ACTIONS_ID_TOKEN_REQUEST_URL" -ne "") {
Write-Host "Renew federated token"
$result = Invoke-RestMethod -Method GET -UseBasicParsing -Headers @{ "Authorization" = "bearer $ENV:ACTIONS_ID_TOKEN_REQUEST_TOKEN"; "Accept" = "application/vnd.github+json" } -Uri "$ENV:ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange"
$bcauthContext.clientAssertion = $result.value
}
New-BcAuthContext `
-clientID $bcAuthContext.clientID `
-tenantID $bcAuthContext.tenantID `
Expand Down
1 change: 1 addition & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
6.0.30
Issue 3762 Give Option to Choose SQL PowerShell Module When Restoring From BacPac
There are instances where sqlps does not work as expected when it is installed. This change adds a switch parameter, useSqlServerModule, to Restore-BcDatabaseFromArtifacts, New-NavContainer, and the BcContainerHelper config file.
Issue 1303 from AL-Go repository - renew federated token when access token needs renewal (works only for GitHub at this time)

6.0.29
Issue 3591 When using Publish-NAVApp to publish an app, which fails compilation in the service, the command might hang forever - the fix for this is a temporary hack put in place for the versions which doesn't work.
Expand Down

0 comments on commit 0f49ca8

Please sign in to comment.