Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/src/api/class-browsercontext.md
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,12 @@ its geolocation.
## async method: BrowserContext.setHTTPCredentials
* since: v1.8
* langs: js
* deprecated: Browsers may cache credentials after successful authentication. Create a new browser context instead.

Sets the credentials for HTTP authentication for this browser context.

:::note
Browsers may cache credentials per origin after a successful authentication, so changing credentials for an origin that has already been authenticated may have no effect.
:::

### param: BrowserContext.setHTTPCredentials.httpCredentials
* since: v1.8
Expand Down
6 changes: 5 additions & 1 deletion packages/playwright-client/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10602,7 +10602,11 @@ export interface BrowserContext {
}): Promise<void>;

/**
* @deprecated Browsers may cache credentials after successful authentication. Create a new browser context instead.
* Sets the credentials for HTTP authentication for this browser context.
*
* **NOTE** Browsers may cache credentials per origin after a successful authentication, so changing credentials for
* an origin that has already been authenticated may have no effect.
*
* @param httpCredentials Pass an array to use different credentials for different origins. The first entry that matches the request origin
* is used, and entries with no origin match any request.
*/
Expand Down
6 changes: 5 additions & 1 deletion packages/playwright-core/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10602,7 +10602,11 @@ export interface BrowserContext {
}): Promise<void>;

/**
* @deprecated Browsers may cache credentials after successful authentication. Create a new browser context instead.
* Sets the credentials for HTTP authentication for this browser context.
*
* **NOTE** Browsers may cache credentials per origin after a successful authentication, so changing credentials for
* an origin that has already been authenticated may have no effect.
*
* @param httpCredentials Pass an array to use different credentials for different origins. The first entry that matches the request origin
* is used, and entries with no origin match any request.
*/
Expand Down
Loading