marvinody / mercari

a wrapper around mercari jp shopping site
43 stars 15 forks source link

Dpop #26

Open yoyosnart opened 1 year ago

yoyosnart commented 1 year ago

May I inquire about how to find the method used to generate Dpop?

marvinody commented 1 year ago

@yoyosnart I'm unsure of what exactly you're looking for, but I can link you the official thing.

https://www.ietf.org/archive/id/draft-fett-oauth-dpop-04.html

If you have more specific questions, please ask specifically. The code is public so you can also take a peek at that and ask if certain pieces are unknown or unfamiliar.

yoyosnart commented 1 year ago

@yoyosnart I'm unsure of what exactly you're looking for, but I can link you the official thing.

https://www.ietf.org/archive/id/draft-fett-oauth-dpop-04.html

If you have more specific questions, please ask specifically. The code is public so you can also take a peek at that and ask if certain pieces are unknown or unfamiliar.

Thank you for your response. I don't understand why you need to explicitly pass these three parameters, uuid, method, and url, to generate DPOP. generate_DPOP (*, uuid, method, url)

marvinody commented 1 year ago

I will link to the page again, mainly section 4.1

image

If you need to request a different API endpoint, then the uri, (and maybe method) would change and require a new DPoP to be created for that endpoint call.

yoyosnart commented 1 year ago

I will link to the page again, mainly section 4.1

image

  • uuid becomes jti
  • method becomes htm
  • url becomes htu All 3 are required for a valid DPoP which is what mercari jp uses as an auth when I was playing with it and writing this library.

If you need to request a different API endpoint, then the uri, (and maybe method) would change and require a new DPoP to be created for that endpoint call.

Oh!I see!THANK YOU!!