-
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.
Merge pull request #40 from cloudblue/LITE-28133_Add_capability_to_up…
…load_price_file_for_a_Marketplace_in_a_Hub LITE-28133 Add capability to upload price file for a Marketplace in a Hub
- Loading branch information
Showing
13 changed files
with
630 additions
and
33 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.