Class StaticCredentialProvider

StaticCredentialProvider. The provider will always return the static AWSCredential.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

credentials: AWSCredentials

Methods

  • Return a valid credentials. Please note mqtt.js does not support promises, meaning that credentials provider implementation should handle application-level authentication refreshing so that the websocket connection could simply grab the latest valid tokens when getCredentials() get called.

    Returns undefined | AWSCredentials

    Returns

    AWSCredentials

  • Invoked by browser MQTT clients before a connection is attempted. Sub-classes that source credentials asynchronously should override this API to perform asynchronous credentials resolution.

    Asynchronous providers that cache session-based credentials should resolve the returned promise if the cached credentials are still valid.

    Returns Promise<void>

    a promise that resolves if credentials were successfully refreshed, rejected otherwise.

Generated using TypeDoc