question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getting HTTP_AUTHENTICATION key missing with custom auth middleware

See original GitHub issue

Hey 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:closed
  • Created 5 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mandrewstuartcommented, Mar 22, 2019

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.

0reactions
agaleracommented, Mar 21, 2019

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found