From 16fa229a09dae9d7a3fbe0cf3adebc1cda1cdb21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Dybvik=20Langfors?= Date: Wed, 21 Dec 2022 11:52:45 +0100 Subject: [PATCH] Change parameter name to match config name --- .../Interfaces/IMaskinportenService.cs | 6 +++--- .../Services/MaskinportenService.cs | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Altinn.ApiClients.Maskinporten/Interfaces/IMaskinportenService.cs b/src/Altinn.ApiClients.Maskinporten/Interfaces/IMaskinportenService.cs index 9351d3f..63fd025 100644 --- a/src/Altinn.ApiClients.Maskinporten/Interfaces/IMaskinportenService.cs +++ b/src/Altinn.ApiClients.Maskinporten/Interfaces/IMaskinportenService.cs @@ -10,17 +10,17 @@ public interface IMaskinportenService /// /// Generates a Maskinporten access token using a JsonWebKey /// - Task GetToken(JsonWebKey jwk, string environment, string clientId, string scope, string resource, string consumerOrg = null, bool disableCaching = false); + Task GetToken(JsonWebKey jwk, string environment, string clientId, string scope, string resource, string consumerOrgNo = null, bool disableCaching = false); /// /// Generates a Maskinporten access token using a X509Certificate /// - Task GetToken(X509Certificate2 cert, string environment, string clientId, string scope, string resource, string consumerOrg = null, bool disableCaching = false); + Task GetToken(X509Certificate2 cert, string environment, string clientId, string scope, string resource, string consumerOrgNo = null, bool disableCaching = false); /// /// Generates a Maskinporten access token using a base64encoded JsonWebKey /// - Task GetToken(string base64EncodedJWK, string environment, string clientId, string scope, string resource, string consumerOrg = null, bool disableCaching = false); + Task GetToken(string base64EncodedJWK, string environment, string clientId, string scope, string resource, string consumerOrgNo = null, bool disableCaching = false); /// /// Generates a access token based on supplied definition containing settings and secrets. diff --git a/src/Altinn.ApiClients.Maskinporten/Services/MaskinportenService.cs b/src/Altinn.ApiClients.Maskinporten/Services/MaskinportenService.cs index dc664f6..83e2334 100644 --- a/src/Altinn.ApiClients.Maskinporten/Services/MaskinportenService.cs +++ b/src/Altinn.ApiClients.Maskinporten/Services/MaskinportenService.cs @@ -38,22 +38,22 @@ public MaskinportenService(HttpClient httpClient, _tokenCacheProvider = tokenCacheProvider; } - public async Task GetToken(X509Certificate2 cert, string environment, string clientId, string scope, string resource, string consumerOrg = null, bool disableCaching = false) + public async Task GetToken(X509Certificate2 cert, string environment, string clientId, string scope, string resource, string consumerOrgNo = null, bool disableCaching = false) { - return await GetToken(cert, null, environment, clientId, scope, resource, consumerOrg, disableCaching); + return await GetToken(cert, null, environment, clientId, scope, resource, consumerOrgNo, disableCaching); } - public async Task GetToken(JsonWebKey jwk, string environment, string clientId, string scope, string resource, string consumerOrg = null, bool disableCaching = false) + public async Task GetToken(JsonWebKey jwk, string environment, string clientId, string scope, string resource, string consumerOrgNo = null, bool disableCaching = false) { - return await GetToken(null, jwk, environment, clientId, scope, resource, consumerOrg, disableCaching); + return await GetToken(null, jwk, environment, clientId, scope, resource, consumerOrgNo, disableCaching); } - public async Task GetToken(string base64EncodedJwk, string environment, string clientId, string scope, string resource, string consumerOrg = null, bool disableCaching = false) + public async Task GetToken(string base64EncodedJwk, string environment, string clientId, string scope, string resource, string consumerOrgNo = null, bool disableCaching = false) { byte[] base64EncodedBytes = Convert.FromBase64String(base64EncodedJwk); string jwkjson = Encoding.UTF8.GetString(base64EncodedBytes); JsonWebKey jwk = new JsonWebKey(jwkjson); - return await GetToken(null, jwk, environment, clientId, scope, resource, consumerOrg, disableCaching); + return await GetToken(null, jwk, environment, clientId, scope, resource, consumerOrgNo, disableCaching); } public async Task GetToken(IClientDefinition clientDefinition, bool disableCaching = false)