Skip to content

Commit 8f9e335

Browse files
committed
Updated parameter order and parameter table order for SAS token example
1 parent 5135119 commit 8f9e335

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/iot-hub/authenticate-authorize-sas.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,16 @@ This section provides examples of generating SAS tokens in different code langua
222222

223223
A SAS token has the following format:
224224

225-
`SharedAccessSignature sig={signature-string}&se={expiry}&skn={policyName}&sr={URL-encoded-resourceURI}`
225+
`SharedAccessSignature sr={URL-encoded-resourceURI}&sig={signature-string}&se={expiry}&skn={policyName}`
226226

227227
Here are the expected values:
228228

229229
| Value | Description |
230230
| --- | --- |
231-
| {signature-string} |An HMAC-SHA256 signature string of the form: `{URL-encoded-resourceURI} + "\n" + expiry`. **Important**: The key is decoded from base64 and used as key to perform the HMAC-SHA256 computation. |
231+
| {URL-encoded-resourceURI} |Lower case URL-encoding of the lower case resource URI |
232232
| {resourceURI} |URI prefix (by segment) of the endpoints that can be accessed with this token, starting with host name of the IoT hub (no protocol). SAS tokens granted to backend services are scoped to the IoT hub level; for example, `myHub.azure-devices.net`. SAS tokens granted to devices must be scoped to an individual device; for example, `myHub.azure-devices.net/devices/device1`. |
233+
| {signature-string} |An HMAC-SHA256 signature string of the form: `{URL-encoded-resourceURI} + "\n" + {expiry}`. **Important**: The key is decoded from base64 and used as key to perform the HMAC-SHA256 computation. |
233234
| {expiry} |UTF8 strings for number of seconds since the epoch 00:00:00 UTC on 1 January 1970. |
234-
| {URL-encoded-resourceURI} |Lower case URL-encoding of the lower case resource URI |
235235
| {policyName} |The name of the shared access policy to which this token refers. Absent if the token refers to device-registry credentials. |
236236

237237
The URI prefix is computed by segment and not by character. For example, `/a/b` is a prefix for `/a/b/c` but not for `/a/bc`.

0 commit comments

Comments
 (0)