35
edits
| Line 30: | Line 30: | ||
USERNAME:PASSWORD | USERNAME:PASSWORD | ||
[[File:1 text action.png|thumb]] | |||
=== Step 2: === | === Step 2: === | ||
| Line 36: | Line 36: | ||
Encode: convert it to Base64 | Encode: convert it to Base64 | ||
Add an Encode action directly below the Text action. Make sure it says Encode Text with base64, then tap to expand it and set Line Breaks to None. | Add an Encode action directly below the Text action. Make sure it says Encode Text with base64, then tap to expand it and set Line Breaks to None. | ||
[[File:2 encode base64.png|thumb|alt=Encode with base64, Line Breaks set to None.]] | |||
=== Step 3: === | === Step 3: === | ||
| Line 41: | Line 43: | ||
Set Variable: name the result b64creds | Set Variable: name the result b64creds | ||
Add a Set Variable action. Name the variable b64creds. It should automatically show Base64 Encoded as its value; if not, tap the value and choose the Base64 Encoded result from Step 2. | Add a Set Variable action. Name the variable b64creds. It should automatically show Base64 Encoded as its value; if not, tap the value and choose the Base64 Encoded result from Step 2. | ||
[[File:3 set variable.png|thumb|alt=Save the Base64 output as b64creds]] | |||
=== Step 4: === | === Step 4: === | ||
| Line 46: | Line 50: | ||
Get Contents of URL: send the request | Get Contents of URL: send the request | ||
Add a Get Contents of URL action. This is the step that actually contacts sudoroom. | Add a Get Contents of URL action. This is the step that actually contacts sudoroom. | ||
===== Configure it like this: ===== | ===== Configure it like this: ===== | ||
| Line 58: | Line 63: | ||
===== Common mistake: ===== | ===== Common mistake: ===== | ||
If you type the letters “b64creds” instead of picking the variable, the shortcut sends that literal word as your password and the door won’t open. Look for the orange bubble. | If you type the letters “b64creds” instead of picking the variable, the shortcut sends that literal word as your password and the door won’t open. Look for the orange bubble. | ||
[[File:4 get contents of url.png|thumb|alt=The finished request: GET, plus the Authorization header]] | |||
== Check Your Work == | == Check Your Work == | ||
| Line 70: | Line 77: | ||
Tap the ▶ play button to test it. If the door responds, you’re done. | Tap the ▶ play button to test it. If the door responds, you’re done. | ||
Optional: add a Show Result action at the end. It will pop up whatever the server sends back, which is very handy when something isn’t working. | Optional: add a Show Result action at the end. It will pop up whatever the server sends back, which is very handy when something isn’t working. | ||
[[File:5 full shortcut.png|thumb|alt=complete shortcut with credentials redacted]] | |||
== Make it one tap == | == Make it one tap == | ||
edits