Skip to content

Commit

Permalink
docs ✍️
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Oct 9, 2024
1 parent c97829a commit d41f4a3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The `Auth` component provides methods for authentication:

#### Universal Auth

#### Authenticating
```typescript
await client.auth().universalAuth.login({
clientId: "<machine-identity-client-id>",
Expand All @@ -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.
Expand All @@ -73,6 +79,7 @@ client.auth().accessToken("<your-access-token>")
> [!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: "<your-identity-id>"
Expand All @@ -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`

Expand Down

0 comments on commit d41f4a3

Please sign in to comment.