-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the AuthClient inheritance tree
- introduce AuthLoginClient and AuthServiceClient as the dividing line between each part of the tree - AuthClient becomes an alias for AuthLoginClient - the "app client" classes inherit from login client - a new base class, AuthBaseClient, provides OIDC and JWK methods, base data like service name, scopes, and error class, but no other methods The calls provided on AuthBaseClient are those which are simple GET methods (and a decorated version thereof) which do not require authentication. As such, they make sense to expose equally to all client types.
- Loading branch information
Showing
27 changed files
with
1,339 additions
and
1,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Changed | ||
~~~~~~~ | ||
|
||
- The inheritance structure used for Globus Auth client classes has changed. | ||
(:pr:`NUMBER`) | ||
|
||
- A new class, ``AuthLoginClient``, is the base for ``NativeAppAuthClient`` | ||
and ``ConfidentialAppAuthClient``. These classes no longer inherit from | ||
``AuthClient``. | ||
|
||
- ``AuthClient`` is now an alias for ``AuthServiceClient``. The new name is | ||
preferred but the old name is not yet deprecated. | ||
|
||
- ``AuthServiceClient`` is now the only class which provides functionality | ||
for accessing Globus Auth APIs. Previously, some of the API accessing | ||
methods were inherited by the ``AuthClient`` subclasses, but would never | ||
work. | ||
|
||
- All of these client classes descend from a common base, ``AuthBaseClient``. | ||
Users should not instantiate this class directly, but it provides | ||
common functionality for all clients to Globus Auth. | ||
|
||
Deprecated | ||
~~~~~~~~~~ | ||
|
||
- Several features of Auth client classes are now deprecated. (:pr:`NUMBER`) | ||
|
||
- Setting ``AuthServiceClient.client_id`` or accessing it as an attribute | ||
is deprecated and will emit a warning. ``AuthClient`` is now an alias for | ||
``AuthServiceClient``, so this applies to both names. | ||
|
||
- ``ConfidentialAppAuthClient.get_identities`` has been preserved as a valid | ||
call, but will emit a warning. Users wishing to access this API via client | ||
credentials should prefer to get an access token using a client credential | ||
callout, and then use that token to call ``get_identities`` using an | ||
``AuthServiceClient``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
from .base import AuthClient | ||
from .base import AuthBaseClient | ||
from .base_login_client import AuthLoginClient | ||
from .confidential_client import ConfidentialAppAuthClient | ||
from .native_client import NativeAppAuthClient | ||
from .service_client import AuthClient, AuthServiceClient | ||
|
||
__all__ = ["AuthClient", "NativeAppAuthClient", "ConfidentialAppAuthClient"] | ||
__all__ = ( | ||
"AuthBaseClient", | ||
"AuthClient", | ||
"AuthServiceClient", | ||
"AuthLoginClient", | ||
"NativeAppAuthClient", | ||
"ConfidentialAppAuthClient", | ||
) |
Oops, something went wrong.