2022-07-05 13:41:43 +00:00
|
|
|
---
|
|
|
|
sidebar_label: Page.authenticate
|
|
|
|
---
|
|
|
|
|
|
|
|
# Page.authenticate() method
|
|
|
|
|
|
|
|
Provide credentials for `HTTP authentication`.
|
|
|
|
|
2024-05-29 09:14:12 +00:00
|
|
|
:::note
|
|
|
|
|
|
|
|
Request interception will be turned on behind the scenes to implement authentication. This might affect performance.
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2022-10-24 07:07:05 +00:00
|
|
|
#### Signature:
|
2022-07-05 13:41:43 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class Page {
|
2024-05-22 12:18:37 +00:00
|
|
|
abstract authenticate(credentials: Credentials | null): Promise<void>;
|
2022-07-05 13:41:43 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2024-03-20 15:03:14 +00:00
|
|
|
<table><thead><tr><th>
|
2022-07-05 13:41:43 +00:00
|
|
|
|
2024-03-20 15:03:14 +00:00
|
|
|
Parameter
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Type
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
|
|
|
</th></tr></thead>
|
|
|
|
<tbody><tr><td>
|
|
|
|
|
|
|
|
credentials
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
2024-05-22 12:18:37 +00:00
|
|
|
[Credentials](./puppeteer.credentials.md) \| null
|
2024-03-20 15:03:14 +00:00
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</tbody></table>
|
2022-07-05 13:41:43 +00:00
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<void>
|
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
|
|
|
To disable authentication, pass `null`.
|