Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

Commit 070b130

Browse files
authored
Use property getters in ApplicationTokenCredentials (#691)
1 parent 1694ebf commit 070b130

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

azure-client-authentication/src/main/java/com/microsoft/azure/credentials/ApplicationTokenCredentials.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,20 +203,20 @@ Future<AuthenticationResult> acquireAccessToken(String resource, ExecutorService
203203
context.setSslSocketFactory(sslSocketFactory());
204204
}
205205
try {
206-
if (clientSecret != null) {
206+
if (clientSecret() != null) {
207207
return context.acquireToken(
208208
resource,
209-
new ClientCredential(this.clientId(), clientSecret),
209+
new ClientCredential(clientId(), clientSecret()),
210210
null);
211-
} else if (clientCertificate != null && clientCertificatePassword != null) {
211+
} else if (clientCertificate() != null && clientCertificatePassword() != null) {
212212
return context.acquireToken(
213213
resource,
214-
AsymmetricKeyCredential.create(clientId, new ByteArrayInputStream(clientCertificate), clientCertificatePassword),
214+
AsymmetricKeyCredential.create(clientId(), new ByteArrayInputStream(clientCertificate()), clientCertificatePassword()),
215215
null);
216-
} else if (clientCertificate != null) {
216+
} else if (clientCertificate() != null) {
217217
return context.acquireToken(
218218
resource,
219-
AsymmetricKeyCredential.create(clientId(), privateKeyFromPem(new String(clientCertificate)), publicKeyFromPem(new String(clientCertificate))),
219+
AsymmetricKeyCredential.create(clientId(), privateKeyFromPem(new String(clientCertificate())), publicKeyFromPem(new String(clientCertificate()))),
220220
null);
221221
}
222222
throw new AuthenticationException("Please provide either a non-null secret or a non-null certificate.");

0 commit comments

Comments
 (0)