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

Sets omniauth.headers on the request phase #806

Merged
merged 2 commits into from Feb 12, 2017
Merged

Sets omniauth.headers on the request phase #806

merged 2 commits into from Feb 12, 2017

Conversation

waiting-for-dev
Copy link
Contributor

Add env['omniauth.headers'] which is a hash with header values on the request phase. Closes #804

@waiting-for-dev
Copy link
Contributor Author

Hey, new to Travis, but it seems all tests are ok but there are some code offenses not introduced by myself.

@zhen6939
Copy link

@waiting-for-dev How's your PR going? Your PR is pretty helpful for many people.

@waiting-for-dev
Copy link
Contributor Author

Hey, THIS is the pull request and it has been ready for a long time waiting for some feedback ;)

@sferik sferik force-pushed the master branch 2 times, most recently from a5c7282 to 76feeea Compare August 8, 2016 18:30
it 'sets omniauth.headers on the request phase' do
OmniAuth.config.mock_auth[:test] = {}

strategy.call(make_env('/auth/test', 'HTTP_FOO' => 'bar'))
Copy link
Member

Choose a reason for hiding this comment

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

Mind testing that it doesn't pick up env's that aren't prepended with 'HTTP_'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, this PR was just intended to keep header values, which in rack env are always prepended with HTTP_.

@tmilewski
Copy link
Member

@waiting-for-dev Would you mind rebasing on Master?

@waiting-for-dev
Copy link
Contributor Author

Hey @tmilewski . Rebase done. Please, review it is correct, it has been a long time since I visited it.

@tmilewski tmilewski merged commit 5a14f50 into omniauth:master Feb 12, 2017
tmilewski added a commit that referenced this pull request Feb 18, 2017
tmilewski added a commit that referenced this pull request Feb 18, 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.

Add something like env["omniauth.headers"]
3 participants