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

Added curl ntlm auth support #1569

Merged
merged 1 commit into from
Mar 22, 2017
Merged

Added curl ntlm auth support #1569

merged 1 commit into from
Mar 22, 2017

Conversation

miguelbalboa
Copy link

No description provided.

@miguelbalboa
Copy link
Author

Same as #1381 but with doc and test.

I'm wondering if StreamHandler::createStream is the right place to through exception if we try to use NTLM with PHP Stream.

Something like:

        // Microsoft NTLM authentication only supported with curl handler
        if (isset($options['auth'])) {
            if (is_array($options['auth']) && isset($options['auth'][2])) {
                if ('ntlm' == $options['auth'][2]) {
                    throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
                }
            }
        }

Or in Client::applyOptions ?

@sagikazarmark
Copy link
Member

Thanks for your contribution.

Can you please squash your commits (and rebase from master)?

Merge branch 'master' of https://github.com/guzzle/guzzle

This shouldn't be there

I'm wondering if StreamHandler::createStream is the right place to through exception if we try to use NTLM with PHP Stream.

Since in Client::applyOptions you don't know about the handlers, I would rather do it in StreamHandler::createStream. Options are normalized there anyway (eg. on_headers callback is checked there).

I would also move all the conditions into one if: same amount of logical expressions to evaluate, but less branching and more readable code.

Do you think you can finish this @miguelbalboa ?

@miguelbalboa
Copy link
Author

@sagikazarmark
squashed and added NTLM Exception in StreamHandler::createStream.

@sagikazarmark sagikazarmark added this to the 6.3.0 milestone Jan 14, 2017
@rudott
Copy link

rudott commented Feb 14, 2017

@sagikazarmark do you know when this will be merged?

@sagikazarmark
Copy link
Member

I don't have an exact ETA yet. Current aim is to get 6.3 around end of February.

@sagikazarmark
Copy link
Member

Thanks for your work on this, sorry for the painfully long wait.

@sagikazarmark sagikazarmark merged commit a1c4a74 into guzzle:master Mar 22, 2017
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

3 participants