Add authentication logic to _Requests class in BfxRestInterface.py. Add _RestAuthenticatedEndpoints class. Add InvalidAuthenticationCredentials in bfxapi/rest/exceptions.py.

This commit is contained in:
Davide Casale
2022-12-14 18:56:03 +01:00
parent 07241b1ba8
commit 851184bf75
2 changed files with 57 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
__all__ = [
"RequestParametersError",
"ResourceNotFound"
"ResourceNotFound",
"InvalidAuthenticationCredentials"
]
class BfxRestException(Exception):
@@ -22,4 +23,11 @@ class ResourceNotFound(BfxRestException):
This error indicates a failed HTTP request to a non-existent resource.
"""
pass
class InvalidAuthenticationCredentials(BfxRestException):
"""
This error indicates that the user has provided incorrect credentials (API-KEY and API-SECRET) for authentication.
"""
pass