Skip to content

Commit

Permalink
Add write scope to instances for org and more logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny Birkeli committed Nov 8, 2022
1 parent 3612724 commit 4614212
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private async Task ProcessMoveNext(AppIdentifier appIdentifier, InstanceIdentifi
}
else
{
_logger.LogError("Failed moving instance {instanceId} to next step.", instanceIdentifier);
_logger.LogError("Failed moving instance {instanceId} to next step. Received error: {errorCode}. Received content: {content}", instanceIdentifier, response.StatusCode, await response.Content.ReadAsStringAsync());
}
}

Expand Down Expand Up @@ -163,7 +163,7 @@ private async Task<Instance> AddCompleteConfirmation(InstanceIdentifier instance
private async Task<TokenResponse> GetOrganizationToken()
{
X509Certificate2 x509cert = await _x509CertificateProvider.GetCertificate();
var maskinportenToken = await _maskinportenService.GetToken(x509cert, _maskinportenSettings.Environment, _maskinportenSettings.ClientId, "altinn:serviceowner/instances.read", string.Empty);
var maskinportenToken = await _maskinportenService.GetToken(x509cert, _maskinportenSettings.Environment, _maskinportenSettings.ClientId, "altinn:serviceowner/instances.read altinn:serviceowner/instances.write", string.Empty);
var altinnToken = await _maskinportenService.ExchangeToAltinnToken(maskinportenToken, _maskinportenSettings.Environment);

return altinnToken;
Expand Down

0 comments on commit 4614212

Please sign in to comment.