@azure/communication-identity 1.3.2-alpha.20240821.1 → 1.3.2-alpha.20240823.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
@@ -93,13 +93,13 @@ Use the `getToken` method to issue or refresh a token for an existing user. The
|
|
93
93
|
- `voip.join` (Access to Calling APIs but without the authorization to start new calls)
|
94
94
|
|
95
95
|
```typescript
|
96
|
-
|
96
|
+
const { token } = await client.getToken(user, ["chat"]);
|
97
97
|
```
|
98
98
|
|
99
99
|
To refresh the user token, issue another token with the same user.
|
100
100
|
|
101
101
|
```typescript
|
102
|
-
|
102
|
+
const { token } = await client.getToken(user, ["chat"]);
|
103
103
|
```
|
104
104
|
|
105
105
|
### Creating a user token with custom expiration
|
@@ -108,7 +108,7 @@ It's also possible to create a Communication Identity access token by customizin
|
|
108
108
|
|
109
109
|
```typescript
|
110
110
|
const tokenOptions: GetTokenOptions = { tokenExpiresInMinutes: 60 };
|
111
|
-
|
111
|
+
const { token } = await client.getToken(user, ["chat"], tokenOptions);
|
112
112
|
```
|
113
113
|
|
114
114
|
### Creating a user and a token in a single request
|
@@ -116,7 +116,7 @@ let { token } = await client.getToken(user, ["chat"], tokenOptions);
|
|
116
116
|
For convenience, use `createUserAndToken` to create a new user and issue a token with one function call. This translates into a single web request as opposed to creating a user first and then issuing a token.
|
117
117
|
|
118
118
|
```typescript
|
119
|
-
|
119
|
+
const { user, token } = await client.createUserAndToken(["chat"]);
|
120
120
|
```
|
121
121
|
|
122
122
|
### Creating a user and a token with custom expiration in a single request
|
@@ -125,7 +125,7 @@ It's also possible to create a Communication Identity access token by customizin
|
|
125
125
|
|
126
126
|
```typescript
|
127
127
|
const userAndTokenOptions: CreateUserAndTokenOptions = { tokenExpiresInMinutes: 60 };
|
128
|
-
|
128
|
+
const { user, token } = await client.createUserAndToken(["chat"], userAndTokenOptions);
|
129
129
|
```
|
130
130
|
|
131
131
|
### Revoking tokens for a user
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-identity",
|
3
|
-
"version": "1.3.2-alpha.
|
3
|
+
"version": "1.3.2-alpha.20240823.1",
|
4
4
|
"description": "SDK for Azure Communication service which facilitates user token administration.",
|
5
5
|
"sdk-type": "client",
|
6
6
|
"main": "dist/index.js",
|
@@ -25,8 +25,8 @@
|
|
25
25
|
"integration-test:browser": "dev-tool run test:browser",
|
26
26
|
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 --exclude 'dist-esm/test/**/browser/*.spec.js' 'dist-esm/test/**/*.spec.js'",
|
27
27
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
28
|
-
"lint:fix": "eslint package.json api-extractor.json README.md src test --
|
29
|
-
"lint": "eslint package.json api-extractor.json README.md src test
|
28
|
+
"lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
|
29
|
+
"lint": "eslint package.json api-extractor.json README.md src test",
|
30
30
|
"pack": "npm pack 2>&1",
|
31
31
|
"test": "npm run build:test && npm run unit-test && npm run integration-test",
|
32
32
|
"test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
|