From 0f69321214b9b6631e8444f9df8aff218cd5dd8d Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Thu, 10 Oct 2024 18:10:34 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 171b5a0..375ca50 100644 --- a/README.md +++ b/README.md @@ -128,11 +128,17 @@ import ( func main() { config := new(credentials.Config). SetType("oidc_role_arn"). + // The ARN of OIDC provider SetOIDCProviderArn("OIDCProviderArn"). + // The path of OIDC token file SetOIDCTokenFilePath("OIDCTokenFilePath"). + // The ARN of role + SetRoleArn("RoleArn"). + // The role session name SetRoleSessionName("RoleSessionName"). + // Not required, The RAM policy document. SetPolicy("Policy"). - SetRoleArn("RoleArn"). + // Not required, limit the Valid time of STS Token SetSessionExpiration(3600) provider, err := credentials.NewCredential(config) if err != nil { From 9bc602818c7c4537f6305f9c040779dd09fbc5e4 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Thu, 10 Oct 2024 18:12:14 +0800 Subject: [PATCH 2/2] Update README-CN.md --- README-CN.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README-CN.md b/README-CN.md index 3307d96..57e4380 100644 --- a/README-CN.md +++ b/README-CN.md @@ -118,11 +118,17 @@ import ( func main() { config := new(credentials.Config). SetType("oidc_role_arn"). + // The ARN of OIDC provider SetOIDCProviderArn("OIDCProviderArn"). + // The path of OIDC token file SetOIDCTokenFilePath("OIDCTokenFilePath"). + // The ARN of role + SetRoleArn("RoleArn"). + // The role session name SetRoleSessionName("RoleSessionName"). + // Not required, The RAM policy document. SetPolicy("Policy"). - SetRoleArn("RoleArn"). + // Not required, limit the Valid time of STS Token SetSessionExpiration(3600) provider, err := credentials.NewCredential(config)