hoodiehq / camp

:circus_tent: Welcome to Hoodie Camp!
https://hoodie.camp
Apache License 2.0
99 stars 55 forks source link

[hoodie-account-server] GET /accounts Add test for 401 "Session invalid" #62

Closed LowProfileDog closed 8 years ago

LowProfileDog commented 8 years ago

This issue is reserved for Fullstack ⚑️ Open Source | Hacktober Edition

πŸŽƒπŸ’»πŸ‘• Hacktoberfest: Trick or Treat!

If you haven’t yet, sign up for Hacktoberfest to earn an exclusive T-Shirt. Plus I’m sure we can teach you a cool trick or two in the process

πŸ€” What you will need to know

You should have worked with JavaScript, Node.js and Testing. This is a rather advanced issue, you will need to write tests yourself and then resolve the issue. If you haven’t done that before, better look for another issue :)

Some knowledge about Hapi will help but you can figure it out if you know the things above :)

🐞 The Bug

Requests like GET /accounts require a valid session. The server validates the session by parsing the authorization request header.

As defined in the Account JSON API Spec, the server should respond with 401 Unauthorized – Authorization header missing instead of 403.

:dart: The goal

As defined in the Account JSON API Spec, the server should respond with 401 Unauthorized – Session invalid. It probably does that already but we can’t be sure unless we have a test for it :)

:clipboard: Step by Step

If this is your first, welcome :tada: :smile: Here is a great tutorial on how to send a pull request using the terminal.

Ping us in the Hoodie Chat or on Twitter

simonyangme commented 8 years ago

@LowProfileDog requesting review :smile_cat: