-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add initial support for creating OAuth2 apps #282
Conversation
9531d0a
to
4a1924f
Compare
4a1924f
to
dabe8a8
Compare
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.
LGTM, some questions
aiven/client/client.py
Outdated
body={"redirect_uri": uri}, | ||
) | ||
|
||
def add_oauth2_client_secret(self, account_id: str, client_id: str) -> Mapping: |
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.
shouldnt this be get_oauth2....
?
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.
Maybe create? It does post request and issues new one.
) | ||
def account__oauth2_client__create(self): | ||
"""Create new OAuth2 client.""" | ||
oauth2_client = self.client.create_oauth2_client( |
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.
if something blows up down the line, the client will persist.
Either remove the client then and there or allow it to be removed later ?
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.
Added removal on exception
dabe8a8
to
6186343
Compare
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.
LGTM
@tvainika did you want to take a look at this ? |
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'm not super familiar with this topic, but from Aiven Client team member POV, looks fine.
About this change: What it does, why it matters
Adds ability to configure OAuth2 apps for users.
As we are moving to allow third-party providers to integrate with aiven services it's helpful to have convenient interface to configure oauth2 apps.