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

add auth_type param to fix issue 1789 #1790

Merged
merged 6 commits into from
Aug 6, 2020
Merged

Conversation

daalvand
Copy link
Contributor

@daalvand daalvand commented Jul 30, 2020

I added auth_type option to resolve the problem of duplicate requests in 1789 issue

        'auth_type' => null //basic, digest, gssnegotiate, ntlm

Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Could you add a changelog?

break;
case "basic":
default:
return CURLAUTH_BASIC;
Copy link
Owner

Choose a reason for hiding this comment

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

Before the default value was CURLAUTH_ANY. I wonder if this change could break some setups?

Copy link
Contributor Author

@daalvand daalvand Jul 31, 2020

Choose a reason for hiding this comment

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

I changed the code and now the _getAuthType function by default returns CURLAUTH_ANY.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added changelogs

@daalvand daalvand force-pushed the master branch 3 times, most recently from a765f10 to 1188010 Compare July 31, 2020 15:31
@ruflin
Copy link
Owner

ruflin commented Aug 4, 2020

Overall the changes LGTM but it seems like some of the tests need to be updated as CI is failing: https://travis-ci.org/github/ruflin/Elastica/jobs/713737332

@daalvand
Copy link
Contributor Author

daalvand commented Aug 5, 2020

I fixed the test failures but I do not know why still test has errors
error

@ruflin
Copy link
Owner

ruflin commented Aug 6, 2020

Thanks for updating the tests. The errors you see now are around linting. Can you run make fix-phpcs and check if there is a diff?

@daalvand
Copy link
Contributor Author

daalvand commented Aug 6, 2020

The error was fixed.

Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, LGTM. One last minor comment.

CHANGELOG.md Outdated
@@ -7,12 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/ruflin/Elastica/compare/7.0.0...master)
### Backward Compatibility Breaks
### Added

Ability to specify the type of authentication manually by the `auth_type` parameter (in the client class config) was added (allowed values are `basic, digest, gssnegotiate, ntlm`)
Copy link
Owner

Choose a reason for hiding this comment

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

Nit: Sorry, didn't spot this before, but could you prefix it by * to make it a list? Same for line 16.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh you are right
I changed it.

@ruflin ruflin merged commit b43380b into ruflin:master Aug 6, 2020
@ruflin
Copy link
Owner

ruflin commented Aug 6, 2020

@daalvand Thank you very much for the contribution and going through the iterations!

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.

2 participants