restforcephp icon indicating copy to clipboard operation
restforcephp copied to clipboard

Get token using jwt / private key

Open drzraf opened this issue 5 years ago • 4 comments

If a token expired, two ways to get a fresh one are provided. Either using getPasswordAccessToken either by getClientCredentialsAccessToken which relies upon client client's id and secret: https://github.com/eventfarm/restforcephp/blob/0f3589b2b00fb1d3f1b3f4e71668a02feb4bf6e9/src/Rest/OAuthRestClient.php#L142

I think it's missing the 3rd one, using a private key. Would you accept a MR which would basically add a (?string) $privateKey parameter on the model of $clientId & co and a getJwtAccessToken($client_id, $private_key, $validity = 3600) method?

Please note that OAuthRestClient is final.

drzraf avatar Mar 09 '20 18:03 drzraf

I'm not sure I have access to this project anymore, but if you submit PR's, I'd look over them, and as long as there are no backwards breaking changes, I'd imagine we could see about merging it. Worst case, feel free to fork the repo and make your changes there.

jasonraimondi avatar Mar 09 '20 20:03 jasonraimondi

@toddcornett then?

drzraf avatar Oct 24 '22 13:10 drzraf

ping :)

drzraf avatar Oct 31 '23 11:10 drzraf

ping :)

No offense man, but it is 4 years from your original post and you still haven't made a PR for this. Either make a PR and hope it gets merged, or fork the project and go that route.

jasonraimondi avatar Oct 31 '23 12:10 jasonraimondi