-
Notifications
You must be signed in to change notification settings - Fork 16.8k
feat(oauth2): add support for trino #30081
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
Changes from all commits
ad2f57b
5840b7a
d2b9906
c1bd864
ac125af
23f4581
4011e69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,7 @@ | |
| import backoff | ||
| import jwt | ||
| from flask import current_app, url_for | ||
| from marshmallow import EXCLUDE, fields, post_load, Schema | ||
| from marshmallow import EXCLUDE, fields, post_load, Schema, validate | ||
|
|
||
| from superset import db | ||
| from superset.distributed_lock import KeyValueDistributedLock | ||
|
|
@@ -192,3 +192,8 @@ class OAuth2ClientConfigSchema(Schema): | |
| ) | ||
| authorization_request_uri = fields.String(required=True) | ||
| token_request_uri = fields.String(required=True) | ||
| request_content_type = fields.String( | ||
|
||
| required=False, | ||
| load_default=lambda: "json", | ||
| validate=validate.OneOf(["json", "data"]), | ||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I think that the most common (standard?) workflow is to send form encoded data, and not JSON. It's just that the first OAuth2 implementation done for Superset targeted GSheets, and Google uses JSON instead of form encoded (it's the same for BigQuery, for example). But now changing the default would break existing databases, so we need to leave JSON as the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that data is likely the more common implementation. As we're still in early days, I feel it's well motivated to introduce a breaking change, as long as we have an
UPDATING.mdexplaining the required steps to get it to work again. This in the interest of having a clean/idiomatic API in the long term..There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@villebro yeah, that sounds good to me.