diff --git a/README.md b/README.md index 85b91d7..1231182 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ The `Auth` component provides methods for authentication: #### Universal Auth +#### Authenticating ```typescript await client.auth().universalAuth.login({ clientId: "", @@ -56,6 +57,11 @@ await client.auth().universalAuth.login({ - `clientId` (string): The client ID of your Machine Identity. - `clientSecret` (string): The client secret of your Machine Identity. +#### Renewing +You can renew the authentication token that is currently set by using the `renew()` method. +```typescript +await client.auth().universalAuth.renew(); + #### Manually set access token By default, when you run a successful `.login()` method call, the access token returned will be auto set for the client instance. However, if you wish to set the access token manually, you may use this method. @@ -73,6 +79,7 @@ client.auth().accessToken("") > [!NOTE] > AWS IAM auth only works when the SDK is being used from within an AWS service, such as Lambda, EC2, etc. +#### Authenticating ```typescript await client.auth().awsIamAuth.login({ identityId: "" @@ -83,6 +90,13 @@ await client.auth().awsIamAuth.login({ - `options` (object): - `identityId` (string): The ID of your identity +#### Renewing +You can renew the authentication token that is currently set by using the `renew()` method. +```typescript +await client.auth().awsIamAuth.renew(); +``` + + ### `secrets`