Skip to content

Commit fc51934

Browse files
authored
Added shaded JAR option
Added shaded JAR option
1 parent 8a05bd5 commit fc51934

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

articles/hdinsight/msi-support-to-access-azure-services.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to provide MSI Support to Access Azure services.
44
ms.service: azure-hdinsight
55
ms.topic: how-to
66
ms.custom: hdinsightactive
7-
ms.date: 07/09/2024
7+
ms.date: 012/04/2024
88
---
99

1010
# MSI Support to access Azure services
@@ -49,16 +49,28 @@ Downloading the JAR in a Maven Build from Maven Central directly.
4949
</snapshots>
5050
</repository>
5151
```
52+
There are two types of client JARs are available in the Maven central.
5253
53-
1. Following is the sample code snippet of HDInsight OAuth client utility library dependency, add the `dependency` section to your pom.xml
54-
55-
```
56-
<dependency>
57-
<groupId>com.microsoft.azure.hdinsight</groupId>
58-
<artifactId>hdi-oauth-token-utils</artifactId>
59-
<version>1.0.0</version>
60-
</dependency>
61-
```
54+
1. Following is the sample code snippet of HDInsight OAuth client utility library dependency, add the `dependency` section to your pom.xml.
55+
1. Simple JAR which contains only the convenient Java utility classes to fetch MSI access token.
56+
57+
```
58+
<dependency>
59+
<groupId>com.microsoft.azure.hdinsight</groupId>
60+
<artifactId>hdi-oauth-token-utils</artifactId>
61+
<version>1.0.0</version>
62+
</dependency>
63+
```
64+
65+
1. Shaded utility JAR bundled with transitve dependent JARs.
66+
67+
```
68+
<dependency>
69+
<groupId>com.microsoft.azure.hdinsight</groupId>
70+
<artifactId>hdi-oauth-token-utils-shaded</artifactId>
71+
<version>1.0.2</version>
72+
</dependency>
73+
```
6274
6375
> [!IMPORTANT]
6476
>
@@ -89,7 +101,7 @@ public class AccessToken {
89101
90102
## Option 1 - HDInsight utility and API usage to fetch access token
91103
92-
Implemented a convenient java utility class to fetch MSI access token by providing target resource URI, which can be EH, KV, Kusto, SqlDB, Cosmos DB etc.
104+
Implemented a convenient java utility class to fetch MSI access token by providing target resource URI, which can be EH, KV, Kusto, SqlDB, Cosmos DB.
93105
94106
### How to use the API
95107
@@ -99,7 +111,7 @@ To fetch the token, you can invoke the API in your job application code.
99111
import com.microsoft.azure.hdinsight.oauthtoken.utils.HdiIdentityTokenServiceUtils;
100112
import com.azure.core.credential.AccessToken;
101113

102-
// uri can be EH, Kusto etc.
114+
// uri can be EH, Kusto
103115
// By default, the Scope is “.default”.
104116
// We will provide a mechanism to take user supplied scope, in future.
105117
String msiResourceUri = https://vault.azure.net/;

0 commit comments

Comments
 (0)