Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Assignment 4 - Authentication #126

Closed
wants to merge 7 commits into from
Closed

Assignment 4 - Authentication #126

wants to merge 7 commits into from

Conversation

tielur
Copy link

@tielur tielur commented Apr 23, 2015

closes #118

@tielur tielur changed the title Assignment 4 authentication Assignment 4 - Authentication Apr 23, 2015
server.register(HapiAuthBasic, function (err) {

if (err) {
return next(err);

Choose a reason for hiding this comment

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

Your indentation is not 4 spaces consistently.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @hussainanjar . I ended up copying the .eslintrc and .eslintignore from lab and putting it in the root directory of this project. I then turned on indentationn to match the style we are trying to follow:

"indent": [2, 4]

http://eslint.org/docs/rules/indent.html

Is it common to do this with Lab? Lab has a default for both of these files, but to add a new rule or change rules, you just copy it and make modifications? Should these be committed to the project?

@tielur
Copy link
Author

tielur commented Apr 24, 2015

I opened this pull request over at lab to hopefully catch things like this in the future.

hapijs/lab#349

@hussainanjar
Copy link

@tielur 👍

@tielur
Copy link
Author

tielur commented Apr 24, 2015

Lab was updated, so you should now get a warning for indentation. Something like this:

Linting results:
    lib/index.js:
        Line 15: indent - Expected indentation of 4 characters.

@FennNaten
Copy link
Contributor

Nice!


var isValid = password === user.password;

return callback(null, isValid, { username: user.username});
Copy link
Contributor

Choose a reason for hiding this comment

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

missing space before }

@hueniverse hueniverse modified the milestone: 0.0.4 May 12, 2015
@hueniverse hueniverse closed this May 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Basic authentication
5 participants