Skip to content

Commit 243be17

Browse files
committed
fix acrolinx issues
1 parent 29ae840 commit 243be17

File tree

1 file changed

+33
-31
lines changed

1 file changed

+33
-31
lines changed

articles/azure-signalr/signalr-concept-authenticate-oauth.md

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ ms.custom: devx-track-csharp, devx-track-azurecli
1212

1313
# Azure SignalR Service authentication
1414

15-
This tutorial builds on the chat room application introduced in the quickstart. If you have not completed [Create a chat room with SignalR Service](signalr-quickstart-dotnet-core.md), complete that exercise first.
15+
This tutorial builds on the chat room application introduced in the quickstart. If you haven't completed [Create a chat room with SignalR Service](signalr-quickstart-dotnet-core.md), complete that exercise first.
1616

17-
In this tutorial, you'll learn how to implement your own authentication and integrate it with the Microsoft Azure SignalR Service.
17+
In this tutorial, you can discover the process of creating your own authentication method and integrate it with the Microsoft Azure SignalR Service.
1818

19-
The authentication initially used in the quickstart's chat room application is too simple for real-world scenarios. The application allows each client to claim who they are, and the server simply accepts that. This approach is not very useful in real-world applications where a rogue user would impersonate others to access sensitive data.
19+
The authentication initially used in the quickstart's chat room application is too simple for real-world scenarios. The application allows each client to claim who they are, and the server simply accepts that. This approach lacks effectiveness in real-world, as it fails to prevent malicious users who might assume false identities from gaining access to sensitive data.
2020

21-
[GitHub](https://github.com/) provides authentication APIs based on a popular industry-standard protocol called [OAuth](https://oauth.net/). These APIs allow third-party applications to authenticate GitHub accounts. In this tutorial, you will use these APIs to implement authentication through a GitHub account before allowing client logins to the chat room application. After authenticating a GitHub account, the account information will be added as a cookie to be used by the web client to authenticate.
21+
[GitHub](https://github.com/) provides authentication APIs based on a popular industry-standard protocol called [OAuth](https://oauth.net/). These APIs allow third-party applications to authenticate GitHub accounts. In this tutorial, you can use these APIs to implement authentication through a GitHub account before allowing client logins to the chat room application. After authenticating a GitHub account, the account information will be added as a cookie to be used by the web client to authenticate.
2222

2323
For more information on the OAuth authentication APIs provided through GitHub, see [Basics of Authentication](https://developer.github.com/v3/guides/basics-of-authentication/).
2424

@@ -52,13 +52,13 @@ To complete this tutorial, you must have the following prerequisites:
5252

5353
1. Open a web browser and navigate to `https://github.com` and sign into your account.
5454

55-
2. For your account, navigate to **Settings** > **Developer settings** and click **Register a new application**, or **New OAuth App** under _OAuth Apps_.
55+
2. For your account, navigate to **Settings** > **Developer settings** and select **Register a new application**, or **New OAuth App** under _OAuth Apps_.
5656

57-
3. Use the following settings for the new OAuth App, then click **Register application**:
57+
3. Use the following settings for the new OAuth App, then select **Register application**:
5858

5959
| Setting Name | Suggested Value | Description |
6060
| -------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61-
| Application name | _Azure SignalR Chat_ | The GitHub user should be able to recognize and trust the app they are authenticating with. |
61+
| Application name | _Azure SignalR Chat_ | The GitHub user should be able to recognize and trust the app they're authenticating with. |
6262
| Homepage URL | `http://localhost:5000` | |
6363
| Application description | _A chat room sample using the Azure SignalR Service with GitHub authentication_ | A useful description of the application that will help your application users understand the context of the authentication being used. |
6464
| Authorization callback URL | `http://localhost:5000/signin-github` | This setting is the most important setting for your OAuth application. It's the callback URL that GitHub returns the user to after successful authentication. In this tutorial, you must use the default callback URL for the _AspNet.Security.OAuth.GitHub_ package, _/signin-github_. |
@@ -154,7 +154,7 @@ In this section, you will implement a `Login` API that authenticates clients usi
154154

155155
1. Add a new controller code file to the _chattest\Controllers_ directory. Name the file _AuthController.cs_.
156156

157-
2. Add the following code for the authentication controller. Make sure to update the namespace, if your project directory was not _chattest_:
157+
2. Add the following code for the authentication controller. Make sure to update the namespace, if your project directory wasn't _chattest_:
158158

159159
```csharp
160160
using AspNet.Security.OAuth.GitHub;
@@ -186,7 +186,8 @@ In this section, you will implement a `Login` API that authenticates clients usi
186186

187187
### Update the Hub class
188188

189-
By default when a web client attempts to connect to SignalR Service, the connection is granted based on an access token that is provided internally. This access token is not associated with an authenticated identity. This access is actually anonymous access.
189+
By default when a web client attempts to connect to SignalR Service, the connection is granted based on an access token that is provided internally. This access token isn't associated with an authenticated identity.
190+
Basically, it's anonymous access.
190191

191192
In this section, you will turn on real authentication by adding the `Authorize` attribute to the hub class, and updating the hub methods to read the username from the authenticated user's claim.
192193

@@ -335,7 +336,7 @@ In this section, you will turn on real authentication by adding the `Authorize`
335336
}
336337
```
337338

338-
4. At the bottom of _index.html_, update the error handler for `connection.start()` as shown below to prompt the user to log in.
339+
4. At the bottom of _index.html_, update the error handler for `connection.start()` as shown below to prompt the user to sign in.
339340

340341
```javascript
341342
connection
@@ -376,7 +377,7 @@ In this section, you will turn on real authentication by adding the `Authorize`
376377
dotnet run
377378
```
378379

379-
By default, the app will be hosted locally on port 5000:
380+
The app is hosted locally on port 5000 by default:
380381

381382
```output
382383
E:\Testing\chattest>dotnet run
@@ -386,19 +387,20 @@ In this section, you will turn on real authentication by adding the `Authorize`
386387
Application started. Press Ctrl+C to shut down.
387388
```
388389

389-
4. Launch a browser window and navigate to `http://localhost:5000`. Click the **here** link at the top to log in with GitHub.
390+
4. Launch a browser window and navigate to `http://localhost:5000`. Select the **here** link at the top to sign in with GitHub.
390391

391392
![OAuth Complete hosted in Azure](media/signalr-concept-authenticate-oauth/signalr-oauth-complete-azure.png)
392393

393-
You will be prompted to authorize the chat app's access to your GitHub account. Click the **Authorize** button.
394+
You will be prompted to authorize the chat app's access to your GitHub account. Select the **Authorize** button.
394395

395396
![Authorize OAuth App](media/signalr-concept-authenticate-oauth/signalr-authorize-oauth-app.png)
396397

397-
You will be redirected back to the chat application and logged in with your GitHub account name. The web application determined you account name by authenticating you using the new authentication you added.
398+
You will be redirected back to the chat application and logged in with your GitHub account name. The web application determined your account name by authenticating you using the new authentication you added.
398399

399400
![Account identified](media/signalr-concept-authenticate-oauth/signalr-oauth-account-identified.png)
400401

401-
Now that the chat app performs authentication with GitHub and stores the authentication information as cookies, you should deploy it to Azure so other users can authenticate with their accounts and communicate from other workstations.
402+
With the chat app now performs authentication with GitHub and stores the authentication information as cookies, the next step involves deploying it to Azure.
403+
This approach enables other users to authenticate using their respective accounts and communicate from various workstations.
402404

403405
## Deploy the app to Azure
404406

@@ -435,11 +437,11 @@ az webapp create --name $WebAppName --resource-group $ResourceGroupName \
435437
--plan $WebAppPlan
436438
```
437439

438-
| Parameter | Description |
439-
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
440-
| ResourceGroupName | This resource group name was suggested in previous tutorials. It is a good idea to keep all tutorial resources grouped together. Use the same resource group you used in the previous tutorials. |
441-
| WebAppPlan | Enter a new, unique, App Service Plan name. |
442-
| WebAppName | This will be the name of the new web app and part of the URL. Use a unique name. For example, signalrtestwebapp22665120. |
440+
| Parameter | Description |
441+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
442+
| ResourceGroupName | This resource group name was suggested in previous tutorials. It's a good idea to keep all tutorial resources grouped together. Use the same resource group you used in the previous tutorials. |
443+
| WebAppPlan | Enter a new, unique, App Service Plan name. |
444+
| WebAppName | This parameter is the name of the new web app and part of the URL. Make it unique. For example, signalrtestwebapp22665120. |
443445

444446
### Add app settings to the web app
445447

@@ -485,7 +487,7 @@ az webapp config appsettings set --name $WebAppName \
485487

486488
| Parameter | Description |
487489
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
488-
| GitHubClientId | Assign this variable the secret Client Id for your GitHub OAuth App. |
490+
| GitHubClientId | Assign this variable the secret Client ID for your GitHub OAuth App. |
489491
| GitHubClientSecret | Assign this variable the secret password for your GitHub OAuth App. |
490492
| ResourceGroupName | Update this variable to be the same resource group name you used in the previous section. |
491493
| SignalRServiceResource | Update this variable with the name of the SignalR Service resource you created in the quickstart. For example, signalrtestsvc48778624. |
@@ -518,12 +520,12 @@ az webapp deployment source config-local-git --name $WebAppName \
518520
--query [url] -o tsv
519521
```
520522

521-
| Parameter | Description |
522-
| ---------------------- | ------------------------------------------------------------------ |
523-
| DeploymentUserName | Choose a new deployment user name. |
524-
| DeploymentUserPassword | Choose a password for the new deployment user. |
525-
| ResourceGroupName | Use the same resource group name you used in the previous section. |
526-
| WebAppName | This will be the name of the new web app you created previously. |
523+
| Parameter | Description |
524+
| ---------------------- | -------------------------------------------------------------------------- |
525+
| DeploymentUserName | Choose a new deployment user name. |
526+
| DeploymentUserPassword | Choose a password for the new deployment user. |
527+
| ResourceGroupName | Use the same resource group name you used in the previous section. |
528+
| WebAppName | This parameter will be the name of the new web app you created previously. |
527529

528530
Make a note the Git deployment URL returned from this command. You will use this URL later.
529531

@@ -564,7 +566,7 @@ The last thing you need to do is update the **Homepage URL** and **Authorization
564566

565567
1. Open [https://github.com](https://github.com) in a browser and navigate to your account's **Settings** > **Developer settings** > **Oauth Apps**.
566568

567-
2. Click on your authentication app and update the **Homepage URL** and **Authorization callback URL** as shown below:
569+
2. Select on your authentication app and update the **Homepage URL** and **Authorization callback URL** as shown below:
568570

569571
| Setting | Example |
570572
| -------------------------- | ------------------------------------------------------------------- |
@@ -584,19 +586,19 @@ Otherwise, if you are finished with the quickstart sample application, you can d
584586
> [!IMPORTANT]
585587
> Deleting a resource group is irreversible and that the resource group and all the resources in it are permanently deleted. Make sure that you do not accidentally delete the wrong resource group or resources. If you created the resources for hosting this sample inside an existing resource group that contains resources you want to keep, you can delete each resource individually from their respective blades instead of deleting the resource group.
586588
587-
Sign in to the [Azure portal](https://portal.azure.com) and click **Resource groups**.
589+
Sign in to the [Azure portal](https://portal.azure.com) and select **Resource groups**.
588590

589591
In the **Filter by name...** textbox, type the name of your resource group. The instructions for this article used a resource group named _SignalRTestResources_. On your resource group in the result list, click **...** then **Delete resource group**.
590592

591593
![Delete](./media/signalr-concept-authenticate-oauth/signalr-delete-resource-group.png)
592594

593-
You will be asked to confirm the deletion of the resource group. Type the name of your resource group to confirm, and click **Delete**.
595+
You will be asked to confirm the deletion of the resource group. Type the name of your resource group to confirm, and select **Delete**.
594596

595597
After a few moments, the resource group and all of its contained resources are deleted.
596598

597599
## Next steps
598600

599601
In this tutorial, you added authentication with OAuth to provide a better approach to authentication with Azure SignalR Service. To learn more about using Azure SignalR Server, continue to the Azure CLI samples for SignalR Service.
600602

601-
> [!div class="nextstepaction"]
603+
> [!div class="nextstepaction"]
602604
> [Azure SignalR CLI Samples](./signalr-reference-cli.md)

0 commit comments

Comments
 (0)