Skip to content

Commit

Permalink
Add token to put request to process next
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny Birkeli committed Nov 8, 2022
1 parent 3b215d9 commit 3612724
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
using Altinn.Common.EFormidlingClient;
using Altinn.Common.EFormidlingClient.Models;
using Altinn.Platform.Storage.Interface.Models;
using AltinnCore.Authentication.Utils;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using System;
using System.Net;
using System.Net.Http.Headers;
using System.Runtime;
using System.Security.Cryptography.X509Certificates;

namespace Altinn.App.Core.EFormidling.Implementation
Expand Down Expand Up @@ -113,9 +115,10 @@ private async Task ProcessMoveNext(AppIdentifier appIdentifier, InstanceIdentifi
{
string url = $"https://{appIdentifier.Org}.apps.{_generalSettings.HostName}/{appIdentifier}/instances/{instanceIdentifier}/process/next";

TokenResponse altinnToken = await GetOrganizationToken();
HttpClient httpClient = _httpClientFactory.CreateClient();

HttpResponseMessage response = await httpClient.PutAsync(url, new StringContent(string.Empty));
HttpResponseMessage response = await httpClient.PutAsync(altinnToken.AccessToken, url, new StringContent(string.Empty));

if (response.IsSuccessStatusCode)
{
Expand Down

0 comments on commit 3612724

Please sign in to comment.