-
Notifications
You must be signed in to change notification settings - Fork 8
Introduce HTTPClient to encapsulate the different mgmt keys needs #633
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
base: main
Are you sure you want to change the base?
Conversation
6c2be90
to
38d913e
Compare
38d913e
to
0a45417
Compare
Coverage reportThe coverage rate went from
Diff Coverage details (click to unfold)descope/authmethod/enchantedlink.py
descope/management/authz.py
descope/management/fga.py
descope/jwt_common.py
descope/management/sso_application.py
descope/authmethod/saml.py
descope/management/sso_settings.py
descope/management/flow.py
descope/http_client.py
descope/authmethod/magiclink.py
descope/management/permission.py
descope/management/tenant.py
descope/descope_client.py
descope/authmethod/webauthn.py
descope/management/jwt.py
descope/authmethod/password.py
descope/management/audit.py
descope/authmethod/totp.py
descope/_auth_base.py
descope/authmethod/oauth.py
descope/authmethod/sso.py
descope/management/group.py
descope/management/outbound_application.py
descope/auth.py
descope/management/project.py
descope/management/role.py
descope/common.py
descope/mgmt.py
descope/authmethod/otp.py
descope/management/access_key.py
descope/_http_base.py
descope/management/user.py
|
80518c2
to
9681348
Compare
This reverts commit 115d030.
9681348
to
5791981
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.
Pull Request Overview
This PR introduces an HTTPClient to encapsulate the different management keys needs by separating HTTP functionality from authentication logic. The change refactors the management API to use a dedicated HTTP client instead of having HTTP methods implemented directly under the Auth class.
- Introduces HTTPClient class to handle all HTTP operations with proper management key support
- Refactors management classes to use HTTPBase instead of AuthBase
- Updates all authentication methods to use the new HTTP client structure
Reviewed Changes
Copilot reviewed 53 out of 53 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
descope/http_client.py | New HTTPClient class encapsulating HTTP operations and management key handling |
descope/_http_base.py | New base class for HTTP-only operations |
descope/mgmt.py | Refactored to use HTTPClient instead of Auth instance |
descope/management/*.py | Updated all management classes to inherit from HTTPBase |
descope/descope_client.py | Updated to use separate HTTP clients for auth and management |
descope/auth.py | Streamlined Auth class to focus on authentication logic |
tests/*.py | Updated test files to use new HTTP client pattern |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@guyp-descope would appreciate a review here |
Related Issues
https://github.com/descope/etc/issues/8683
Description
Introduce HTTPClient to encapsulate the different mgmt keys needs, and use it to perform requests instead of having the HTTP methods implemented directly under the Auth class.
Must