Skip to content

Commit 0bd934f

Browse files
committed
edit pass: comm-services-samples-tutorials
1 parent ed38a4c commit 0bd934f

10 files changed

+257
-156
lines changed

articles/communication-services/how-tos/call-automation/actions-for-call-control.md

Lines changed: 55 additions & 53 deletions
Large diffs are not rendered by default.

articles/communication-services/how-tos/call-automation/control-mid-call-media-actions.md

Lines changed: 140 additions & 43 deletions
Large diffs are not rendered by default.

articles/communication-services/how-tos/call-automation/includes/secure-webhook-endpoint-csharp.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ ms.topic: include file
1111
ms.author: richardcho
1212
---
1313

14-
## Improving Call Automation webhook callback security
14+
## Improve Call Automation webhook callback security
1515

16-
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard Open ID Connect (OIDC) JWT validation techniques to ensure the integrity of the token as follows. The lifetime of the JWT is five (5) minutes and a new token is created for every event sent to the callback URI.
16+
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard OpenID Connect (OIDC) JWT validation techniques to ensure the integrity of the token. The lifetime of the JWT is five minutes, and a new token is created for every event sent to the callback URI.
1717

18-
1. Obtain the Open ID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
19-
2. Install the [Microsoft.AspNetCore.Authentication.JwtBearer NuGet](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer) package.
20-
3. Configure your application to validate the JWT using the NuGet package and the configuration of your Azure Communication Services resource. You need the `audience` values as it is present in the JWT payload.
21-
4. Validate the issuer, audience and the JWT.
22-
- The audience is your Azure Communication Services resource ID you used to set up your Call Automation client. Refer [here](../../../quickstarts/voice-video-calling/get-resource-id.md) about how to get it.
23-
- The JSON Web Key Set (JWKS) endpoint in the OpenId configuration contains the keys used to validate the JWT. When the signature is valid and the token hasn't expired (within 5 minutes of generation), the client can use the token for authorization.
18+
1. Obtain the OpenID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
19+
1. Install the [Microsoft.AspNetCore.Authentication.JwtBearer NuGet](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer) package.
20+
1. Configure your application to validate the JWT by using the NuGet package and the configuration of your Azure Communication Services resource. You need the `audience` value as it appears in the JWT payload.
21+
1. Validate the issuer, the audience, and the JWT:
22+
- The audience is your Azure Communication Services resource ID that you used to set up your Call Automation client. For information about how to get it, see [Get your Azure resource ID](../../../quickstarts/voice-video-calling/get-resource-id.md).
23+
- The JSON Web Key Set (JWKS) endpoint in the OpenId configuration contains the keys that are used to validate the JWT. When the signature is valid and the token hasn't expired (within five minutes of generation), the client can use the token for authorization.
2424

25-
This sample code demonstrates how to use `Microsoft.IdentityModel.Protocols.OpenIdConnect` to validate webhook payload
25+
This sample code demonstrates how to use `Microsoft.IdentityModel.Protocols.OpenIdConnect` to validate the webhook payload:
2626

2727
```csharp
2828
using Microsoft.AspNetCore.Authentication.JwtBearer;

articles/communication-services/how-tos/call-automation/includes/secure-webhook-endpoint-java.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ ms.topic: include file
1111
ms.author: richardcho
1212
---
1313

14-
## Improving Call Automation webhook callback security
14+
## Improve Call Automation webhook callback security
1515

16-
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard Open ID Connect (OIDC) JWT validation techniques to ensure the integrity of the token as follows. The lifetime of the JWT is five (5) minutes and a new token is created for every event sent to the callback URI.
16+
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard OpenID Connect (OIDC) JWT validation techniques to ensure the integrity of the token. The lifetime of the JWT is five minutes, and a new token is created for every event sent to the callback URI.
1717

18-
1. Obtain the Open ID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
19-
2. The following sample uses Spring framework, created using [spring initializr](https://start.spring.io/) with Maven as project build tool.
20-
3. Add the following dependencies in your `pom.xml`:
18+
1. Obtain the OpenID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
19+
1. The following sample uses the Spring framework, which is created by using [spring initializr](https://start.spring.io/) with Maven as the project build tool.
20+
1. Add the following dependencies in your `pom.xml`:
2121

2222
```
2323
<dependency>
@@ -34,12 +34,12 @@ Each mid-call webhook callback sent by Call Automation uses a signed JSON Web To
3434
</dependency>
3535
```
3636

37-
4. Configure your application to validate the JWT and the configuration of your Azure Communication Services resource. You need the `audience` values as it is present in the JWT payload.
38-
5. Validate the issuer, audience and the JWT.
39-
- The audience is your Azure Communication Services resource ID you used to set up your Call Automation client. Refer [here](../../../quickstarts/voice-video-calling/get-resource-id.md) about how to get it.
40-
- The JSON Web Key Set (JWKS) endpoint in the OpenId configuration contains the keys used to validate the JWT. When the signature is valid and the token hasn't expired (within 5 minutes of generation), the client can use the token for authorization.
37+
1. Configure your application to validate the JWT and the configuration of your Azure Communication Services resource. You need the `audience` value as it appears in the JWT payload.
38+
1. Validate the issuer, the audience, and the JWT:
39+
- The audience is your Azure Communication Services resource ID that you used to set up your Call Automation client. For information about how to get it, see [Get your Azure resource ID](../../../quickstarts/voice-video-calling/get-resource-id.md).
40+
- The JSON Web Key Set (JWKS) endpoint in the OpenId configuration contains the keys that are used to validate the JWT. When the signature is valid and the token hasn't expired (within five minutes of generation), the client can use the token for authorization.
4141

42-
This sample code demonstrates how to configure OIDC client to validate webhook payload using JWT
42+
This sample code demonstrates how to configure the OIDC client to validate a webhook payload by using JWT:
4343

4444
```java
4545
package callautomation.example.security;

articles/communication-services/how-tos/call-automation/includes/secure-webhook-endpoint-javascript.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ ms.topic: include file
1111
ms.author: richardcho
1212
---
1313

14-
## Improving Call Automation webhook callback security
14+
## Improve Call Automation webhook callback security
1515

16-
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard Open ID Connect (OIDC) JWT validation techniques to ensure the integrity of the token as follows. The lifetime of the JWT is five (5) minutes and a new token is created for every event sent to the callback URI.
16+
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard OpenID Connect (OIDC) JWT validation techniques to ensure the integrity of the token. The lifetime of the JWT is five minutes, and a new token is created for every event sent to the callback URI.
1717

18-
1. Obtain the Open ID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
19-
2. Install the following packages:
18+
1. Obtain the OpenID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
19+
1. Install the following packages:
2020
- [express npm](https://www.npmjs.com/package/express)
2121
- [jwks-rsa npm](https://www.npmjs.com/package/jwks-rsa)
2222
- [jsonwebtoken npm](https://www.npmjs.com/package/jsonwebtoken)
@@ -25,12 +25,12 @@ Each mid-call webhook callback sent by Call Automation uses a signed JSON Web To
2525
npm install express jwks-rsa jsonwebtoken
2626
```
2727

28-
3. Configure your application to validate the JWT and the configuration of your Azure Communication Services resource. You need the `audience` values as it is present in the JWT payload.
29-
4. Validate the issuer, audience and the JWT.
30-
- The audience is your Azure Communication Services resource ID you used to set up your Call Automation client. Refer [here](../../../quickstarts/voice-video-calling/get-resource-id.md) about how to get it.
31-
- The JSON Web Key Set (JWKS) endpoint in the OpenId configuration contains the keys used to validate the JWT. When the signature is valid and the token hasn't expired (within 5 minutes of generation), the client can use the token for authorization.
28+
1. Configure your application to validate the JWT and the configuration of your Azure Communication Services resource. You need the `audience` value as it appears in the JWT payload.
29+
1. Validate the issuer, the audience, and the JWT:
30+
- The audience is your Azure Communication Services resource ID that you used to set up your Call Automation client. For information about how to get it, see [Get your Azure resource ID](../../../quickstarts/voice-video-calling/get-resource-id.md).
31+
- The JSON Web Key Set (JWKS) endpoint in the OpenId configuration contains the keys that are used to validate the JWT. When the signature is valid and the token hasn't expired (within five minutes of generation), the client can use the token for authorization.
3232

33-
This sample code demonstrates how to configure OIDC client to validate webhook payload using JWT
33+
This sample code demonstrates how to configure the OIDC client to validate a webhook payload by using JWT:
3434

3535
```JavaScript
3636
import express from "express";

articles/communication-services/how-tos/call-automation/includes/secure-webhook-endpoint-python.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ ms.topic: include file
1111
ms.author: richardcho
1212
---
1313

14-
## Improving Call Automation webhook callback security
14+
## Improve Call Automation webhook callback security
1515

16-
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard Open ID Connect (OIDC) JWT validation techniques to ensure the integrity of the token as follows. The lifetime of the JWT is five (5) minutes and a new token is created for every event sent to the callback URI.
16+
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard OpenID Connect (OIDC) JWT validation techniques to ensure the integrity of the token. The lifetime of the JWT is five minutes, and a new token is created for every event sent to the callback URI.
1717

18-
1. Obtain the Open ID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
19-
2. Install the following packages:
18+
1. Obtain the OpenID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
19+
1. Install the following packages:
2020
- [flask pypi](https://pypi.org/project/Flask/)
2121
- [PyJWT pypi](https://pypi.org/project/PyJWT/)
2222

2323
```console
2424
pip install flask pyjwt
2525
```
2626

27-
3. Configure your application to validate the JWT and the configuration of your Azure Communication Services resource. You need the `audience` values as it is present in the JWT payload.
28-
4. Validate the issuer, audience and the JWT.
29-
- The audience is your Azure Communication Services resource ID you used to set up your Call Automation client. Refer [here](../../../quickstarts/voice-video-calling/get-resource-id.md) about how to get it.
30-
- The JSON Web Key Set (JWKS) endpoint in the OpenId configuration contains the keys used to validate the JWT. When the signature is valid and the token hasn't expired (within 5 minutes of generation), the client can use the token for authorization.
27+
1. Configure your application to validate the JWT and the configuration of your Azure Communication Services resource. You need the `audience` value as it appears in the JWT payload.
28+
1. Validate the issuer, the audience, and the JWT:
29+
- The audience is your Azure Communication Services resource ID that you used to set up your Call Automation client. For information about how to get it, see [Get your Azure resource ID](../../../quickstarts/voice-video-calling/get-resource-id.md).
30+
- The JSON Web Key Set (JWKS) endpoint in the OpenId configuration contains the keys that are used to validate the JWT. When the signature is valid and the token hasn't expired (within five minutes of generation), the client can use the token for authorization.
3131

32-
This sample code demonstrates how to configure OIDC client to validate webhook payload using JWT
32+
This sample code demonstrates how to configure the OIDC client to validate a webhook payload by using JWT:
3333

3434
```Python
3535
from flask import Flask, jsonify, abort, request

articles/communication-services/how-tos/call-automation/includes/secure-websocket-csharp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ ms.topic: include file
1111
ms.author: kpunjabi
1212
---
1313

14-
## Websocket code sample
14+
## WebSocket code sample
1515

16-
This sample code demonstrates how to authenticate WebSocket connection requests using JSON Web Token (JWT) tokens.
16+
This sample code demonstrates how to authenticate WebSocket connection requests by using JWT tokens.
1717

1818
```csharp
1919
// 1. Load OpenID Connect metadata

articles/communication-services/how-tos/call-automation/includes/secure-websocket-js.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ ms.topic: include file
1111
ms.author: kpunjabi
1212
---
1313

14-
## Websocket code sample
14+
## WebSocket code sample
1515

16-
This sample demonstrates how to configure an OpenID Connect (OIDC) client to validate WebSocket connection requests using a JSON Web Token (JWT).
16+
This sample demonstrates how to configure an OIDC client to validate WebSocket connection requests by using a JWT.
1717

1818
```JavaScript
1919
const audience = "ACS resource ID";

articles/communication-services/how-tos/call-automation/includes/secure-websocket-python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ ms.topic: include file
1111
ms.author: kpunjabi
1212
---
1313

14-
## Websocket code sample
14+
## WebSocket code sample
1515

16-
This sample demonstrates how to configure an OIDC-compliant client to validate WebSocket connection requests using JWT.
16+
This sample demonstrates how to configure an OIDC-compliant client to validate WebSocket connection requests by using a JWT.
1717

1818
Make sure to install the required package:
1919
`pip install cryptography`

0 commit comments

Comments
 (0)