Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace AuthBase with AuthConfigBase in example #1738

Merged
merged 3 commits into from
Oct 4, 2024
Merged
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
13 changes: 6 additions & 7 deletions docs/website/docs/general-usage/http/rest-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,10 @@ The available authentication methods are defined in the `dlt.sources.helpers.res
- [BearerTokenAuth](#bearer-token-authentication)
- [APIKeyAuth](#api-key-authentication)
- [HttpBasicAuth](#http-basic-authentication)
- [OAuth2ClientCredentials](#oauth20-authorization)
- [OAuth2ClientCredentials](#oauth-20-authorization)
willi-mueller marked this conversation as resolved.
Show resolved Hide resolved

For specific use cases, you can [implement custom authentication](#implementing-custom-authentication) by subclassing the `AuthBase` class from the Requests library.
For specific flavors of OAuth 2.0, you can [implement custom OAuth 2.0](#oauth2-authorization)
by subclassing `OAuth2ClientCredentials`.
For specific use cases, you can [implement custom authentication](#implementing-custom-authentication) by subclassing the `AuthConfigBase` class from the `dlt.sources.helpers.rest_client.auth` module.
For specific flavors of OAuth 2.0, you can [implement custom OAuth 2.0](#oauth-20-authorization) by subclassing `OAuth2ClientCredentials`.
willi-mueller marked this conversation as resolved.
Show resolved Hide resolved

### Bearer token authentication

Expand Down Expand Up @@ -565,12 +564,12 @@ response = client.get("/users")

### Implementing custom authentication

You can implement custom authentication by subclassing the `AuthBase` class and implementing the `__call__` method:
You can implement custom authentication by subclassing the `AuthConfigBase` class and implementing the `__call__` method:

```py
from requests.auth import AuthBase
from dlt.sources.helpers.rest_client.auth import AuthConfigBase

class CustomAuth(AuthBase):
class CustomAuth(AuthConfigBase):
def __init__(self, token):
self.token = token

Expand Down
Loading