Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 3a2d872

Browse files
authored
Updated to latest msal4j (#847)
1 parent baeb225 commit 3a2d872

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

libraries/bot-connector/src/main/java/com/microsoft/bot/connector/authentication/CachingOpenIdMetadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ private void refreshCache() {
7373

7474
try {
7575
URL openIdUrl = new URL(this.url);
76-
HashMap<String, String> openIdConf =
76+
HashMap<String, Object> openIdConf =
7777
this.mapper.readValue(openIdUrl, new TypeReference<HashMap<String, Object>>() {
7878
});
79-
URL keysUrl = new URL(openIdConf.get("jwks_uri"));
79+
URL keysUrl = new URL(openIdConf.get("jwks_uri").toString());
8080
lastUpdated = System.currentTimeMillis();
8181
UrlJwkProvider provider = new UrlJwkProvider(keysUrl);
8282
keyCache = provider.getAll().stream().collect(Collectors.toMap(Jwk::getId, jwk -> jwk));

libraries/bot-connector/src/main/java/com/microsoft/bot/connector/authentication/CredentialsAuthenticator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class CredentialsAuthenticator implements Authenticator {
2828
throws MalformedURLException {
2929

3030
app = ConfidentialClientApplication
31-
.builder(appId, ClientCredentialFactory.create(appPassword))
31+
.builder(appId, ClientCredentialFactory.createFromSecret(appPassword))
3232
.authority(configuration.getAuthority())
3333
.build();
3434

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
<dependency>
230230
<groupId>com.microsoft.azure</groupId>
231231
<artifactId>msal4j</artifactId>
232-
<version>0.5.0-preview</version>
232+
<version>1.8.0</version>
233233
</dependency>
234234

235235
<dependency>

0 commit comments

Comments
 (0)