-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LITE-28133 Add capability to upload price file for a Marketplace in a…
… Hub
- Loading branch information
1 parent
3725d30
commit 8fe74e9
Showing
13 changed files
with
629 additions
and
32 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
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,22 @@ | ||
from requests.auth import AuthBase | ||
|
||
|
||
class APSTokenAuth(AuthBase): | ||
''' | ||
Need to consider that APS Token has a very limited time validity and hence | ||
the client using this type auth should not be reused. | ||
''' | ||
|
||
def __init__( | ||
self, | ||
aps_token: str, | ||
aps_identity: str, | ||
): | ||
self.aps_token = aps_token | ||
self.aps_identity = aps_identity | ||
|
||
def __call__(self, r): | ||
r.headers['aps-token'] = self.aps_token | ||
r.headers['aps-identity-id'] = self.aps_identity | ||
|
||
return r |
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
Oops, something went wrong.