Vonage / vonage-java-sdk

Vonage Server SDK for Java. API support for SMS, Messages, Voice, Text-to-Speech, Numbers, Verify (2FA), Video and more.
https://developer.vonage.com/en/home
Apache License 2.0
95 stars 119 forks source link

feat: Add Network Authentication & refactor AuthMethod #530

Closed SMadani closed 1 month ago

SMadani commented 1 month ago

This PR not only adds support for the "backend" Vonage Network Auth API, but also refactors the com.vonage.client.auth package. Most notably, it separates the TokenAuthMethod class into ApiKeyQueryParamsAuthMethod and ApiKeyHeaderAuthMethod to more clearly distinguish their roles. Consequently, the auth method usage in DynamicEndpoint implementations has been modified to accommodate this.

Furthermore, proper testing of the existing auth methods is now in place, along with a major refactoring of SignatureAuthMethod and the RequestSigning helper methods.