Skip to content

Added curl ntlm auth support#1569

Merged
sagikazarmark merged 1 commit intoguzzle:masterfrom
miguelbalboa:master
Mar 22, 2017
Merged

Added curl ntlm auth support#1569
sagikazarmark merged 1 commit intoguzzle:masterfrom
miguelbalboa:master

Conversation

@miguelbalboa
Copy link
Copy Markdown

No description provided.

@miguelbalboa
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

rudott commented Feb 14, 2017

@sagikazarmark do you know when this will be merged?

@sagikazarmark
Copy link
Copy Markdown
Member

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

@sagikazarmark
Copy link
Copy Markdown
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.

4 participants