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

getting bad http header format erro #48

Open
gmchaturvedi1 opened this issue Mar 30, 2016 · 8 comments
Open

getting bad http header format erro #48

gmchaturvedi1 opened this issue Mar 30, 2016 · 8 comments

Comments

@gmchaturvedi1
Copy link

{
"statusCode": 400,
"error": "Bad Request",
"message": "Bad HTTP authentication header format"
}

kindly help me to resolve it i am new to hapi

@vmendiratta
Copy link

Your Authorization header should be 'Bearer '

@uditkumawat
Copy link

@vmendiratta can we please give some example related to 'Bearer' token ? I also facing the same error,

@vmendiratta
Copy link

Your request should have an Authorization header field.
The value of this field would look like:
Bearer

Example:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1

@uditkumawat
Copy link

thanks 👍

@genaro-picazo
Copy link

My Authorization header is Bearer and I still get the error:

GET /books HTTP/1.1
Host: localhost:3000
Authorization: Bearer mGQMVgiiVFJWAWs7
Cache-Control: no-cache
Postman-Token: 704a91cd-62c8-6061-b20e-2e7309f42c69

@moshejutru
Copy link

moshejutru commented Jan 18, 2017

can u please give example to Authorization with model roles :admin, super admin and user

@mpj
Copy link

mpj commented Feb 4, 2017

For future travelers: I was getting this error because I had forgotten the audience property in the params when requesting the token. That successfully gave me a token but it failed with this error when I actually tried to use it.

@ignivaravinderrikhi
Copy link

Why Is it necessary to added this "Bearer" prefix to the token ???

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

No branches or pull requests

7 participants