getting HTTP_AUTHENTICATION key missing with custom auth middleware
See original GitHub issueHey team, I am a long time fan of bottle and this is my first issue - so thank you.
I inherited a contract with the front end that relies on the header: {‘authentication’: ‘bearer TOKEN’}, where TOKEN is a session token. I am getting the unexpected error:
return tonat(self.environ[self._ekey(key)], 'latin1')
KeyError: 'HTTP_AUTHORIZATION'
Do you know why? Could you please help me sort it out?
Thank you, Andrew
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Basic HTTP authentication with Node and Express 4
Version 4 (I'm using 4.2) removed the basicAuth middleware, though, so I'm a little stuck. I have the following code, but it doesn't...
Read more >HTTP Authentication - Fano Framework
Developer can create their own custom authentication by implementing IAuth interface and inject it to TBasicAuthMiddleware constructor. How Basic Auth ...
Read more >ASP.NET Core 3.1 - Basic Authentication Tutorial with ...
In this tutorial we'll go through a simple example of how to implement Basic HTTP authentication in an ASP.NET Core 3.1 API with...
Read more >Key Auth Middleware | Echo - High performance, minimalist ...
For missing key, it sends “400 - Bad Request” response. Usage. e.Use(middleware.KeyAuth(func ...
Read more >Basic Authentication in ASP.NET Web API - Microsoft Learn
Basic Authentication with IIS; Basic Authentication with Custom ... Basic authentication is defined in RFC 2617, HTTP Authentication: Basic ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks @agalera I appreciate your reaching out. I find JWTs to be a lot of overhead so I don’t typically use them. Also, the project I ran into trouble with using the ‘authorization’ header, I don’t have the freedom to change the authorization mechanism as there are too many moving parts.
@mandrewstuart if you’re interested, I made a plugin a long time ago for bottle to use jwt, maybe it will be useful
https://github.com/agalera/bottlejwt