Skip to content

Commit 6ea70cf

Browse files
tlmiiscottaddie
andauthored
Add documentation for default credential use (#18412)
* Add documentation for default credential use * Edit pass on HTTP REPL default credentials PR (#18413) * react to feedback Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
1 parent 0aae4ec commit 6ea70cf

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

aspnetcore/web-api/http-repl.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use the HTTP REPL .NET Core Global Tool to browse and
55
monikerRange: '>= aspnetcore-2.1'
66
ms.author: scaddie
77
ms.custom: mvc
8-
ms.date: 12/11/2019
8+
ms.date: 05/20/2020
99
no-loc: [Blazor, "Identity", "Let's Encrypt", Razor, SignalR]
1010
uid: web-api/http-repl
1111
---
@@ -809,7 +809,23 @@ To set an HTTP request header, use one of the following approaches:
809809

810810
## Test secured endpoints
811811

812-
The HTTP REPL supports the testing of secured endpoints through the use of HTTP request headers. Examples of supported authentication and authorization schemes include basic authentication, JWT bearer tokens, and digest authentication. For example, you can send a bearer token to an endpoint with the following command:
812+
The HTTP REPL supports the testing of secured endpoints in two ways: via the default credentials of the logged in user or through the use of HTTP request headers.
813+
814+
### Default credentials
815+
816+
Consider a scenario in which the web API you're testing is hosted in IIS and is secured with Windows authentication. You want the credentials of the user running the tool to flow across to the HTTP endpoints being tested. To pass the default credentials of the logged in user:
817+
818+
1. Set the `httpClient.useDefaultCredentials` preference to `true`:
819+
820+
```console
821+
pref set httpClient.useDefaultCredentials true
822+
```
823+
824+
1. Exit and restart the tool before sending another request to the web API.
825+
826+
### HTTP request headers
827+
828+
Examples of supported authentication and authorization schemes include basic authentication, JWT bearer tokens, and digest authentication. For example, you can send a bearer token to an endpoint with the following command:
813829

814830
```console
815831
set header Authorization "bearer <TOKEN VALUE>"

0 commit comments

Comments
 (0)