-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for user-supplied SAS Tokens (#1140)
* Support for user-supplied SAS Tokens now available via the `sastoken` parameter when constructing an `IoTHubSession` or a `ProvisioningSession` * New `.update_sastoken()` method added to both `IoTHubSession` and `ProvisioningSession` to facilitate user-supplied SAS token replacement * Removed the provisional `sastoken_fn` callback parameter from constructor of both `IoTHubSession` and `ProvisioningSession` as it is no longer necessary * Added support for connection strings that contain a SAS token via the `.from_connection_string` factory method * Introduced a new exception, `CredentialError`, which indicates an expired SAS token * Removed `ExternalSasTokenGenerator` class as it is no longer necessary because `sastoken_fn` is no longer supported * Renamed `InternalSasTokenGenerator` class to simply `SasTokenGenerator` * Moved SAS token TTL configuration to the `.generate_sastoken()` method of `SasTokenGenerator` instead of instantiation * Removed usage of `SasTokenProvider` from underlying MQTT and HTTP clients, however the implementation still is defined (for now) * Updated docstrings * Added unit tests for connection strings containing `SharedAccessSignature` and `GatewayHostName` * Added previously missing unit tests for `sastoken_ttl` * Enabled support for SAS auth in E2E tests * Migration guide changes
- Loading branch information
1 parent
f3e84fc
commit c6920dc
Showing
23 changed files
with
1,197 additions
and
1,421 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
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
Oops, something went wrong.