Skip to content

Commit

Permalink
example: [java sdk] add example for credConf.setSTSEndpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Dec 20, 2023
1 parent 34b1d79 commit 33c025e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/rrsa/java-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>credentials-java</artifactId>
<version>0.2.10</version>
<version>0.2.12</version>
</dependency>

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ static com.aliyun.credentials.Client newOidcCred() throws Exception {
credConf.oidcProviderArn = System.getenv("ALIBABA_CLOUD_OIDC_PROVIDER_ARN");
credConf.oidcTokenFilePath = System.getenv("ALIBABA_CLOUD_OIDC_TOKEN_FILE");
credConf.roleSessionName = "test-rrsa-oidc-token";
// https://next.api.aliyun.com/product/Sts
// credConf.setSTSEndpoint("sts-vpc.cn-hangzhou.aliyuncs.com")
return new com.aliyun.credentials.Client(credConf);
}
}

0 comments on commit 33c025e

Please sign in to comment.