diff --git a/Vonage/NumberVerification/NumberVerificationClient.cs b/Vonage/NumberVerification/NumberVerificationClient.cs
index 7c29dac5..af808e54 100644
--- a/Vonage/NumberVerification/NumberVerificationClient.cs
+++ b/Vonage/NumberVerification/NumberVerificationClient.cs
@@ -10,10 +10,16 @@ namespace Vonage.NumberVerification;
internal class NumberVerificationClient : INumberVerificationClient
{
+ private readonly VonageHttpClient authorizationClient;
private readonly VonageHttpClient vonageClient;
- internal NumberVerificationClient(VonageHttpClientConfiguration configuration) =>
+ internal NumberVerificationClient(VonageHttpClientConfiguration configuration,
+ VonageHttpClientConfiguration authorizationConfiguration)
+ {
this.vonageClient = new VonageHttpClient(configuration, JsonSerializerBuilder.BuildWithSnakeCase());
+ this.authorizationClient =
+ new VonageHttpClient(authorizationConfiguration, JsonSerializerBuilder.BuildWithSnakeCase());
+ }
///
public Task> AuthenticateAsync(Result request) =>
@@ -49,7 +55,7 @@ private Task> SendGetTokenRequest(GetTokenRequest reque
this.vonageClient.SendWithResponseAsync(request);
private Task> SendAuthorizeRequest(AuthorizeRequest request) =>
- this.vonageClient.SendWithResponseAsync(request);
+ this.authorizationClient.SendWithResponseAsync(request);
private static GetTokenRequest BuildGetTokenRequest(AuthorizeResponse request) => request.BuildGetTokenRequest();
diff --git a/Vonage/VonageClient.cs b/Vonage/VonageClient.cs
index 833ac2aa..7391c022 100644
--- a/Vonage/VonageClient.cs
+++ b/Vonage/VonageClient.cs
@@ -142,7 +142,8 @@ public Credentials Credentials
public INumberVerificationClient NumberVerificationClient { get; private set; }
private VonageHttpClientConfiguration BuildConfiguration(HttpClient client) =>
- new(client, this.Credentials.GetAuthenticationHeader(), this.Credentials.GetUserAgent());
+ new VonageHttpClientConfiguration(client, this.Credentials.GetAuthenticationHeader(),
+ this.Credentials.GetUserAgent());
private Configuration GetConfiguration() => this.configuration.IfNone(Configuration.Instance);
@@ -166,6 +167,7 @@ private void PropagateCredentials()
var videoConfiguration = this.BuildConfiguration(currentConfiguration.BuildHttpClientForVideo());
var euConfiguration =
this.BuildConfiguration(currentConfiguration.BuildHttpClientForRegion(VonageUrls.Region.EU));
+ var oidcConfiguration = this.BuildConfiguration(currentConfiguration.BuildHttpClientForOidc());
this.VerifyV2Client = new VerifyV2Client(nexmoConfiguration);
this.SubAccountsClient = new SubAccountsClient(nexmoConfiguration, this.Credentials.ApiKey);
this.NumberInsightV2Client = new NumberInsightV2Client(nexmoConfiguration);
@@ -174,7 +176,7 @@ private void PropagateCredentials()
this.MeetingsClient = new MeetingsClient(euConfiguration, new FileSystem());
this.ProactiveConnectClient = new ProactiveConnectClient(euConfiguration);
this.SimSwapClient = new SimSwapClient(euConfiguration);
- this.NumberVerificationClient = new NumberVerificationClient(euConfiguration);
+ this.NumberVerificationClient = new NumberVerificationClient(euConfiguration, oidcConfiguration);
this.VideoClient = new VideoClient(videoConfiguration);
}
}
\ No newline at end of file