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

Feature | Deprecate Auth Methods #368

Merged
merged 2 commits into from
Feb 10, 2024
Merged

Conversation

Sammyjo20
Copy link
Collaborator

@Sammyjo20 Sammyjo20 commented Feb 9, 2024

This PR deprecates the following methods on the connector/request

  • withTokenAuth
  • withBasicAuth
  • withDigestAuth
  • withQueryAuth
  • withHeaderAuth
  • withCertificateAuth

I would like to deprecate these methods as they were originally introduced into v1 as a convenient helper method to quickly add auth to an existing connector or request, but I feel that it goes against Saloon’s re-usability pattern.

In my opinion, authentication should always be defined in the defaultAuth method of the connector or request however this auth can still be applied using the authenticate method.

@Sammyjo20 Sammyjo20 marked this pull request as ready for review February 9, 2024 23:30
Copy link
Collaborator Author

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review

Copy link
Collaborator Author

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review

@Sammyjo20 Sammyjo20 merged commit fca735c into v3 Feb 10, 2024
14 checks passed
@Sammyjo20 Sammyjo20 deleted the feature/deprecate-auth-methods branch February 12, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant