AwsAbstractCredentials Class
(QtAws::Core::AwsAbstractCredentials)The AwsAbstractCredentials class provides an interface for AWS credentials. * * * More...
| Header: | #include <AwsAbstractCredentials> |
| Inherited By: | QtAws::Core::AwsAnonymousCredentials and QtAws::Core::AwsBasicCredentials |
Public Functions
| AwsAbstractCredentials(QObject * const parent = 0) | |
| virtual | ~AwsAbstractCredentials() |
| virtual QString | accessKeyId() const = 0 |
| virtual QDateTime | expiration() const |
| virtual bool | isExpired() const |
| virtual bool | isRefreshable() const |
| virtual QString | secretKey() const = 0 |
| virtual QString | token() const = 0 |
Public Slots
| virtual bool | refresh() |
Signals
| void | changed() |
Detailed Description
* *
The AwsAbstractCredentials class provides an interface for AWS credentials. * * *
Member Function Documentation
AwsAbstractCredentials::AwsAbstractCredentials(QObject * const parent = 0)
Constructs an AwsAbstractCredentials object with parent parent.
[virtual] AwsAbstractCredentials::~AwsAbstractCredentials()
Destroys the AWS credentials.
This virtual destructor does nothing (yet) - its here to allow for safe polymorphic destruction.
[pure virtual] QString AwsAbstractCredentials::accessKeyId() const
Returns the AWS access key ID for this credentials object.
[signal] void AwsAbstractCredentials::changed()
Emitted when credentials have been updated.
See also refresh().
[virtual] QDateTime AwsAbstractCredentials::expiration() const
Returns the QDateTime 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 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).
See also isExpired() and refresh().
[virtual] bool AwsAbstractCredentials::isExpired() const
Returns true if this credentials object has expired; false otherwise.
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.
See also refresh().
[virtual] bool AwsAbstractCredentials::isRefreshable() const
Returns true if this credentials object is able to be refreshed; false otherwise.
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.
See also refresh().
[virtual slot] bool AwsAbstractCredentials::refresh()
Begins an asynchronous refresh transaction, and returns true if successfully begun; false otherwise.
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.
See also changed().
[pure virtual] QString AwsAbstractCredentials::secretKey() const
Returns the AWS secret access key for this credentials object.
[pure virtual] QString AwsAbstractCredentials::token() const
Returns the AWS security token for this credentials object.
© 2018 Paul Colby Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.