libqtaws
0.1.0
UnofficialAWSlibraryforQt
|
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.
AwsAbstractCredentials::AwsAbstractCredentials | ( | QObject *const | parent = 0 | ) |
Construct an AwsAbstractCredentials.
parent |
|
pure virtual |
AWS access key ID for this credentials object.
Implemented in AwsBasicCredentials, and AwsAnonymousCredentials.
|
signal |
Signal emitted when this object's credentials have been updated.
|
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).
|
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.
|
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.
|
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.
|
pure virtual |
AWS secret access key for this credentials object.
Implemented in AwsBasicCredentials, and AwsAnonymousCredentials.
|
pure virtual |
AWS security token for this credentials object.
Implemented in AwsBasicCredentials, and AwsAnonymousCredentials.