Closed edouardmenayde closed 6 years ago
IMHO the stuff you covered is more about understanding building HTTP request with authorization header than about verify_header
module itself. Maybe readme or even some separate guide would be better place to write about it?
@oskar1233 I agree it might be best in the readme. Do I create a new PR or do I amend the existing commit ?
@edouardmenayde thanks for getting involved! I agree with @edouardmenayde that this doesn't really belong in the code documentation, especially not without more context.
Perhaps we should look into adding a section to the README for now on testing best practices?
Thoughts @ueberauth/developers?
Maybe some subheading in the basics section? Just because that's what you usually do in the beginning and boosts your API understanding :)
Hi! It's been some days since the last comment thus I think if there's any strong insight against adding that to the readme It would have been raised by now. I took the initiative to amend my last commit and move the documentation to the readme.
@yordis I fixed the typo and gave some more context to the test. I tried giving much more context with the controller etc. but It becomes quickly more of a blog post than a little hint to test guardian.
This just saved me from hours of headache. I hadn't used the Authorization
header before and didn't realize that it had to look like authorization: <type>: <token>
. Was digging through the suggested documentation and saw an example with a put_req_header
call
@Moggers really happy my headache saved you from having one :)
@doomspork I fixed my mistake, this should be ok to merge :-)
Thank you @edouardmenayde! 👍
I'm new to elixir and its ecosystem thus i'm starting to learn its ins and outs including guardian. I love how easy testing is with elixir but I couldn't understand why my test couldn't pass thus I had to dig through the code to understand how the header is parsed by default. I think adding a few line of documentation could help the next guy experience.