-
Notifications
You must be signed in to change notification settings - Fork 142
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 #205 from zeyu-zh/master
支持credentials provider
- Loading branch information
Showing
11 changed files
with
204 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,26 @@ | ||
class Credentials(object): | ||
def __init__(self, access_key_id, access_key_secret, security_token=None): | ||
self.access_key_id = access_key_id | ||
self.access_key_secret = access_key_secret | ||
self.security_token = security_token | ||
|
||
def get_access_key_id(self): | ||
return self.access_key_id | ||
|
||
def get_access_key_secret(self): | ||
return self.access_key_secret | ||
|
||
def get_security_token(self): | ||
return self.security_token | ||
|
||
class CredentialsProvider(object): | ||
def get_credentials(self): | ||
return | ||
|
||
|
||
class StaticCredentialsProvider(CredentialsProvider): | ||
def __init__(self, access_key_id="", access_key_secret="", security_token=""): | ||
self.credentials = Credentials(access_key_id, access_key_secret, security_token) | ||
|
||
def get_credentials(self): | ||
return self.credentials |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
class Credentials(object): | ||
def __init__(self, access_key_id, access_key_secret, security_token=None): | ||
self.access_key_id = access_key_id | ||
self.access_key_secret = access_key_secret | ||
self.security_token = security_token | ||
|
||
def get_access_key_id(self): | ||
return self.access_key_id | ||
|
||
def get_access_key_secret(self): | ||
return self.access_key_secret | ||
|
||
def get_security_token(self): | ||
return self.security_token | ||
|
||
class CredentialsProvider(object): | ||
def get_credentials(self): | ||
return | ||
|
||
|
||
class StaticCredentialsProvider(CredentialsProvider): | ||
def __init__(self, access_key_id="", access_key_secret="", security_token=""): | ||
self.credentials = Credentials(access_key_id, access_key_secret, security_token) | ||
|
||
def get_credentials(self): | ||
return self.credentials | ||
|
||
def set_access_key_id(self, access_key_id): | ||
self.credentials.access_key_id = access_key_id | ||
|
||
def set_access_key_secret(self, access_key_secret): | ||
self.credentials.access_key_secret = access_key_secret |
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.