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.

Oauth2 ClientCredentials Authorization hangs

See original GitHub issue

For some reasons authorization with Oauth2 ClientCredentials only request the token, but not the actual api call. Imagine following code:

@host = https://api.de
@sb_clientId = ...
@sb_clientSecret = ...
@sb_tokenEndpoint = https://api.de/oauth/token

### Person
GET /foo
Authorization: oauth2 client_credentials sb

Both in CLI & vsc-plugin I see the request for obtaining an access token successfully executed, but the subsequent call for requesting /foo doesn’t happen. I tried the ‘Arbeitsagentur Jobbörse’ exmaple, there it worked. Any ideas what could be wrong or how to debug this?

btw. @sb_tokenEndpoint = /oauth/token or @sb_tokenEndpoint = {{host}}/oauth/token fails as well - why?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AnWebercommented, Nov 29, 2021

I did not expect 201. I will see what the spec says. Otherwise all statuses <400 should be valid. Only 200 is mentioned, your server does not conform to the spec. https://datatracker.ietf.org/doc/html/rfc6749#section-5.1

I will add <400 to the list of valid return codes.

1reaction
AnWebercommented, Nov 28, 2021

I would simply increase the log level first. Add --debug or --verbose to your httpyac cli call. The “silent” abort actually only happens when an action cancels processing. With verbose you should see who started the processing last and there I would then set a breakpoint.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth2 client credentials don't working at portal
I have trial Edge license and Edge (4.19.06) at Private cloud. ... OAuth2 client credentials don't working at portal ... I'm stuck with...
Read more >
Stuck with Oauth2 V3 API - Constant Contact Community
Using Rails and Oauth2, I am running into an error that says: "{"error_description":"Invalid client or client credentials" ...
Read more >
[QUESTION] Client Credentials Flow openAPI UI #774 - GitHub
I am stuck on how to amend the OAuth2PasswordRequestForm class. So far this is what I have. `class Oauth2ClientCredentials(OAuth2): def init(
Read more >
How to keep the client credentials confidential, while using ...
The first two (and possibly the last one) can be used from third-party apps that need access to the API. The authorization code...
Read more >
clientcredentials - Go Packages
Package clientcredentials implements the OAuth2.0 "client credentials" token flow ... on an authorization previously arranged with the authorization server.
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