-
Notifications
You must be signed in to change notification settings - Fork 981
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop deprecated auth helpers from Connection. (#1308)
Merge Authentication middleware. Add possibility of passing a proc. Update documentation. (cherry picked from commit fe600c7)
- Loading branch information
Showing
7 changed files
with
58 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,28 +141,6 @@ | |
end | ||
end | ||
|
||
describe 'basic_auth' do | ||
subject { conn } | ||
|
||
context 'calling the #basic_auth method' do | ||
before { subject.basic_auth 'Aladdin', 'open sesame' } | ||
|
||
it { expect(subject.headers['Authorization']).to eq('Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==') } | ||
end | ||
|
||
context 'adding basic auth info to url' do | ||
let(:url) { 'http://Aladdin:open%[email protected]/fish' } | ||
|
||
it { expect(subject.headers['Authorization']).to eq('Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==') } | ||
end | ||
end | ||
|
||
describe '#token_auth' do | ||
before { subject.token_auth('abcdef', nonce: 'abc') } | ||
|
||
it { expect(subject.headers['Authorization']).to eq('Token nonce="abc", token="abcdef"') } | ||
end | ||
|
||
describe '#build_exclusive_url' do | ||
context 'with relative path' do | ||
subject { conn.build_exclusive_url('sake.html') } | ||
|
@@ -605,7 +583,6 @@ | |
|
||
context 'after manual changes' do | ||
before do | ||
subject.basic_auth('', '') | ||
subject.headers['content-length'] = 12 | ||
subject.params['b'] = '2' | ||
subject.options[:open_timeout] = 10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters