Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST /token in body, not in url #384

Open
gabrielsroka opened this issue Jan 25, 2024 · 0 comments
Open

POST /token in body, not in url #384

gabrielsroka opened this issue Jan 25, 2024 · 0 comments

Comments

@gabrielsroka
Copy link
Contributor

gabrielsroka commented Jan 25, 2024

on

parameters = {
'grant_type': 'client_credentials',
'scope': ' '.join(self._config["client"]["scopes"]),
'client_assertion_type':
'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
'client_assertion': jwt
}
encoded_parameters = urlencode(parameters, quote_via=quote)
org_url = self._config["client"]["orgUrl"]
url = f"{org_url}{OAuth.OAUTH_ENDPOINT}?" + \
encoded_parameters

it should send the params in the body, not in the query string.

spec: https://datatracker.ietf.org/doc/html/rfc6749#page-30

see also node SDK

https://github.com/okta/okta-sdk-nodejs/blob/895d48c9bf4e2e1d0d2fadcf0a84cc550e301851/src/oauth.js#L56-L64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant