Live data from Hacker News

Micro APIs for Everyday Use

blog.m3o.com

31–40 of 91 posts

Re: Micro APIs for Everyday Use

#33
Could someone explain to me this whole movement towards "Bearer" authentication? I understand it in an Oauth context and using JWTs. I don't really understand it with simple API keys. What is the point of prefixing and API key with "Bearer "?

Re: Micro APIs for Everyday Use

#34
post #33

Could someone explain to me this whole movement towards "Bearer" authentication? I understand it in an Oauth context and using JWTs. I don't really understand it with simple API keys. What is the point of prefixing and API key with "Bearer "?

An Authorization header value is defined to be a pair of type and the actual authentication/authorization information. "Bearer" works, so why make up something else?

Re: Micro APIs for Everyday Use

#35
post #33

Could someone explain to me this whole movement towards "Bearer" authentication? I understand it in an Oauth context and using JWTs. I don't really understand it with simple API keys. What is the point of prefixing and API key with "Bearer "?

      A security token with the property that any party in possession of
      the token (a "bearer") can use the token in any way that any other
      party in possession of it can.  Using a bearer token does not
      require a bearer to prove possession of cryptographic key material
      (proof-of-possession).
I think most people interpret that definition as including API secret keys. I’d be curious to hear any alternative suggestions as I run into this fairly regularly.

https://datatracker.ietf.org/doc/html/rfc6750#section-1.2

Also relevant: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentica...

Post reply on HN