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

Support hapi auth "modes" #14

Merged
merged 2 commits into from Apr 5, 2018
Merged

Support hapi auth "modes" #14

merged 2 commits into from Apr 5, 2018

Conversation

marttinen
Copy link

Added tests to check hapi's mode: 'optional' and mode: 'try'.

@marttinen marttinen mentioned this pull request Apr 5, 2018
@marttinen marttinen changed the title add tests for hapi auth modes WIP: add tests for hapi auth modes Apr 5, 2018
@coveralls
Copy link

coveralls commented Apr 5, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 7b01e33 on marttinen:3.3.0-rc into 43c28b5 on felixheck:3.3.0-rc.

@felixheck
Copy link
Owner

@marttinen thx for the PR. can you pls fix the linting error? :)

@marttinen
Copy link
Author

Sure, not done yet. :)

@marttinen
Copy link
Author

Please note that on requests with invalid authentication, the result changed from

'Bearer strategy="keycloak-jwt", error="Invalid credentials", reason="invalid token (expired)"'

to

'Bearer strategy="keycloak-jwt", reason="invalid token (expired)", error="Invalid credentials"'

I'm not sure why the order changed, but IMO that shouldn't be an issue.

@marttinen marttinen changed the title WIP: add tests for hapi auth modes add tests for hapi auth modes Apr 5, 2018
@marttinen marttinen changed the title add tests for hapi auth modes Support hapi auth "modes" Apr 5, 2018
@@ -27,21 +27,11 @@ test('get boom error with custom scheme', (t) => {
}))
})

test('get boom error with default message', (t) => {
Copy link
Author

Choose a reason for hiding this comment

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

Removed because duplicated test.

@felixheck
Copy link
Owner

It's because it depends if the error attribute is caused by the first or last argument passed to boom.unauthorized() :)

so you're finished and happy with the result? ;-)
I am.

@marttinen
Copy link
Author

Yep, work finished and ready to be merged.

@felixheck felixheck merged commit 24aecdc into felixheck:3.3.0-rc Apr 5, 2018
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