Coder Social home page Coder Social logo

Comments (10)

bojanz avatar bojanz commented on May 9, 2024

That is correct. From the RFC you linked:

The authorization server MUST:

require client authentication for confidential clients or for any
client that was issued client credentials (or with other
authentication requirements),

So, each flow requires a client_id unless your server allows every client. We've yet to come across such a use case.

from guzzle-oauth2-plugin.

stephenheron avatar stephenheron commented on May 9, 2024

Hi Bojan,

Thanks for getting back to me so quickly!

The RFC shows this as a example for getting an access token:

POST /token HTTP/1.1
Host: server.example.com
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
Content-Type: application/x-www-form-urlencoded
grant_type=password&username=johndoe&password=A3ddj3w

It does not contain the client_id. I thought the section that you quoted was discussing the requirement for Basic Auth but I may be wrong.

Thanks,
Stephen

from guzzle-oauth2-plugin.

pjcdawkins avatar pjcdawkins commented on May 9, 2024

Hi Stephen

The client ID in that is czZCaGRSa3F0MzpnWDFmQmF0M2JW

from guzzle-oauth2-plugin.

pjcdawkins avatar pjcdawkins commented on May 9, 2024

Client credentials can be sent in the body as 'client_id' and 'client_secret', or in Basic authentication - see #16

from guzzle-oauth2-plugin.

stephenheron avatar stephenheron commented on May 9, 2024

Hi Patrick,

Ah right ok I see now! Thanks for clearing that up.

Do you know when your pull request will be merged in?

Thanks,
Stephen

from guzzle-oauth2-plugin.

pjcdawkins avatar pjcdawkins commented on May 9, 2024

Done! I'll tag a release with that soon (I want to review the other PR first) - if that all makes sense then please close this issue

from guzzle-oauth2-plugin.

stephenheron avatar stephenheron commented on May 9, 2024

Fantastic!

Thanks everyone this is maybe the best interaction I have ever had on GitHub.

Keep up the good work ;)

Thanks,
Stephen

from guzzle-oauth2-plugin.

stephenheron avatar stephenheron commented on May 9, 2024

Hi Guys,

Sorry for reopening the issue but I might have noticed another wee issue.

In change that was made to add the client_id/client_secret to the headers: GrantTypeBase.php Line 70. The client_id and client_secret are being unset from the $body but on line 66 the body has already been assigned to the $requestOptions array. Meaning that the unset on line 70 has no effect.

Thanks,
Stephen

from guzzle-oauth2-plugin.

pjcdawkins avatar pjcdawkins commented on May 9, 2024

Correct... I'll fix that...!

from guzzle-oauth2-plugin.

pjcdawkins avatar pjcdawkins commented on May 9, 2024

Thanks

from guzzle-oauth2-plugin.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.