diff --git a/README-zh-CN.md b/README-zh-CN.md index 0ea8c09..0f932fd 100644 --- a/README-zh-CN.md +++ b/README-zh-CN.md @@ -60,7 +60,7 @@ $credential->getSecurityToken(); getAccessKeySecret(); 'sts', @@ -107,7 +107,7 @@ $credential->getSecurityToken(); 'ram_role_arn', @@ -138,7 +138,7 @@ Credentials工具会自动获取ECS实例绑定的RAM角色,调用ECS的元数 'ecs_ram_role', @@ -161,7 +161,7 @@ $credential->getSecurityToken(); 'oidc_role_arn', @@ -194,7 +194,7 @@ $credential->getSecurityToken(); 'credentials_uri', @@ -215,7 +215,7 @@ $credential->getBearerToken(); 'bearer', diff --git a/README.md b/README.md index b6f1b2c..cef018e 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Setup access_key credential through [User Information Management][ak], it have f 'sts', @@ -109,7 +109,7 @@ By specifying [RAM Role][RAM Role], the credential will be able to automatically 'ram_role_arn', @@ -140,7 +140,7 @@ The Credentials tool automatically obtains the RAM role attached to an ECS insta 'ecs_ram_role', @@ -163,7 +163,7 @@ After you attach a RAM role to a worker node in an Container Service for Kuberne 'oidc_role_arn', @@ -196,7 +196,7 @@ By specifying the url, the credential will be able to automatically request main 'credentials_uri', @@ -217,12 +217,16 @@ If credential is required by the Cloud Call Centre (CCC), please apply for Beare 'bearer', - 'bearer_token' => '', +$config = new Config([ + 'type' => 'bearer', + 'bearerToken' => '', ]); -$bearerToken->getBearerToken(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getBearerToken(); ``` ## Default credential provider chain