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)