Skip to content

Issue 163#164

Merged
mrlannigan merged 4 commits intohapijs:masterfrom
dpmott:issue-163
Feb 8, 2018
Merged

Issue 163#164
mrlannigan merged 4 commits intohapijs:masterfrom
dpmott:issue-163

Conversation

@dpmott
Copy link
Copy Markdown
Contributor

@dpmott dpmott commented Jul 26, 2017

Addresses #163

Allow fail-over to secondary auth strategy when validateFunc returns special Boom.unauthorized.

Refer to the Hapi docs:
https://hapijs.com/api#serverauthschemename-scheme

" If the err does not include a message but does include the scheme name (e.g. Boom.unauthorized(null, 'Custom')), additional strategies will be attempted in the order of preference (defined in the route configuration). "

@mrlannigan mrlannigan added this to the 8.0.1 milestone Jan 21, 2018
@mrlannigan mrlannigan added the feature New functionality or improvement label Jan 21, 2018
@mrlannigan
Copy link
Copy Markdown
Contributor

Hi @dpmott,

Thank you for your contribution! Are you able to fix the conflicts?

@dpmott
Copy link
Copy Markdown
Contributor Author

dpmott commented Feb 5, 2018

@mrlannigan Sorry for the late response. Updates pushed.

test/index.js Outdated
expect(header[0]).to.contain('Max-Age=60');
const cookie = header[0].match(/(?:[^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)\s*=\s*(?:([^\x00-\x20\"\,\;\\\x7F]*))/);

server.inject({ method: 'GET', url: '/resource', headers: { cookie: 'first=' + cookie[1] } }, (res2) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add consistency to the way you inject requests? (i.e. use await)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mrlannigan change pushed.

@mrlannigan mrlannigan merged commit 6ac6882 into hapijs:master Feb 8, 2018
@mrlannigan
Copy link
Copy Markdown
Contributor

Published with v8.1.0

@lock
Copy link
Copy Markdown

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants