libqtaws
0.1.0
UnofficialAWSlibraryforQt-InternalDocumentation
|
Interface class for providing AWS credentials. More...
Public Slots | |
virtual bool | refresh () |
Refresh this object's credentials. More... | |
Signals | |
void | changed () |
Signal emitted when this object's credentials have been updated. More... | |
Public Member Functions | |
AwsAbstractCredentials (QObject *const parent=0) | |
Construct an AwsAbstractCredentials. More... | |
virtual QString | accessKeyId () const =0 |
AWS access key ID for this credentials object. More... | |
virtual QString | secretKey () const =0 |
AWS secret access key for this credentials object. More... | |
virtual QString | token () const =0 |
AWS security token for this credentials object. More... | |
virtual QDateTime | expiration () const |
DateTime at which the credentials will expire. More... | |
virtual bool | isExpired () const |
Is this credentials object currently expired. More... | |
virtual bool | isRefreshable () const |
Is this credentials object refreshable. More... | |
Interface class for providing AWS credentials.
Definition at line 30 of file awsabstractcredentials.h.
AwsAbstractCredentials::AwsAbstractCredentials | ( | QObject *const | parent = 0 | ) |
Construct an AwsAbstractCredentials.
parent |
Definition at line 36 of file awsabstractcredentials.cpp.
|
pure virtual |
AWS access key ID for this credentials object.
Implemented in AwsBasicCredentials, and AwsAnonymousCredentials.
Referenced by AwsSignatureV0Private::adornRequest(), AwsSignatureV2Private::adornRequest(), AwsSignatureV3Private::authorizationHeaderValue(), and AwsSignatureV4Private::authorizationHeaderValue().
|
signal |
Signal emitted when this object's credentials have been updated.
Referenced by AwsBasicCredentials::setAccessKeyId(), AwsBasicCredentials::setSecretKey(), and AwsBasicCredentials::setToken().
|
virtual |
DateTime at which the credentials will expire.
This method should not be invoked unless the object is known to be refreshable (ie isRefreshable() returns true
). As the base implementation of isRefreshable() always returns false
, this implementation of expiration() should not be invoked.
Derived classes that return true
from isRefreshable() must also override this function to provide the appropriate expiration timestamp (which may a null QDateTime if the credentials never expire).
Definition at line 79 of file awsabstractcredentials.cpp.
References isRefreshable().
Referenced by isExpired().
|
virtual |
Is this credentials object currently expired.
In this base implementation, non-refreshable credentials (ie those for which isRefreshable() returns false
) are assumed to never expire, whereas refreshable credentials are assume to be expired only if expiration() returns a valid QDateTime representing a time in the past (ie earlier than QDateTime::currentDateTimeUtc()).
Derived classes may override this method to implement custom expiration logic.
true
if this credentials object is expired, false
otherwise.Definition at line 105 of file awsabstractcredentials.cpp.
References expiration(), and isRefreshable().
|
virtual |
Is this credentials object refreshable.
This base implementation always returns false
- ie credentials are not refreshable by default. However, dervived classes may override this method as appropriate.
Derived classes that override this method must also override the expiration() method (merely returning a null QDateTime is the credentials do not expire), and may wish to override isExpired() also.
true
if this credentials object is expired, false
otherwise.Definition at line 130 of file awsabstractcredentials.cpp.
Referenced by expiration(), isExpired(), and refresh().
|
virtualslot |
Refresh this object's credentials.
This slot begins an asynchronous refresh transaction, and should be followed by a change() signal when the credentials have been refreshed.
This method should not be invoked unless the object is known to be refreshable (ie isRefreshable() returns true
). As the base implementation of isRefreshable() always returns false
, this implementation of expiration() should not be invoked.
Derived classes that return true
from isRefreshable() must also override this function to provide the appropriate refresh behaviour.
true
if the refresh transaction has begun successfully, false
otherwise.Definition at line 155 of file awsabstractcredentials.cpp.
References isRefreshable().
|
pure virtual |
AWS secret access key for this credentials object.
Implemented in AwsBasicCredentials, and AwsAnonymousCredentials.
Referenced by AwsSignatureV3Private::authorizationHeaderValue(), AwsSignatureV0::sign(), AwsSignatureV2::sign(), and AwsSignatureV4Private::signingKey().
|
pure virtual |
AWS security token for this credentials object.
Implemented in AwsBasicCredentials, and AwsAnonymousCredentials.