You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Please be noticed **":"** string after the **App Key**.
746
747
- The ```/revoke``` endpoint does not use the ```password``` in a Basic Authorization, so we need to send empty password in ```AppKey:``` format.
747
748
749
+
I am demonstrating with the Python [requests](https://requests.readthedocs.io/) library. We can use the ```auth(clientid,'')``` to the ```requests.post``` function, and the library handles the base64 conversion for us.
750
+
751
+
If you are using other languages or libraries (like C#), you may need to convert the ```App-Key:``` to based64 ascii string by your self.
752
+
748
753
Python code:
749
754
750
755
```Python
751
756
#step 7 - Revoking Token
752
-
import base64
753
-
754
-
clientId_bytes =f'{clientId}:'.encode('ascii') #Please be noticed ":" string after the app-key
Copy file name to clipboardExpand all lines: RDP-Generic-CFS.html
+8-12Lines changed: 8 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -8772,7 +8772,7 @@ <h3 id="Step-7:-Revoke-Token-to-ending-the-session.">Step 7: Revoke Token to end
8772
8772
<ul>
8773
8773
<li><p>Header:</p>
8774
8774
<ul>
8775
-
<li>Authorization = <code>Basic <App Key+":" in Base64></code></li>
8775
+
<li>Authorization = <code>Basic <App Key+":" in Base64 format></code></li>
8776
8776
</ul>
8777
8777
</li>
8778
8778
<li><p>Body parameter</p>
@@ -8801,6 +8801,8 @@ <h3 id="Step-7:-Revoke-Token-to-ending-the-session.">Step 7: Revoke Token to end
8801
8801
<li>Please be noticed <strong>":"</strong> string after the <strong>App Key</strong>.</li>
8802
8802
<li>The <code>/revoke</code> endpoint does not use the <code>password</code> in a Basic Authorization, so we need to send empty password in <code>AppKey:</code> format.</li>
8803
8803
</ul>
8804
+
<p>I am demonstrating with the Python <ahref="https://requests.readthedocs.io/">requests</a> library. We can use the <code>auth(clientid,'')</code> to the <code>requests.post</code> function, and the library handles the base64 conversion for us.</p>
8805
+
<p>If you are using other languages or libraries (like C#), you may need to convert the <code>App-Key:</code> to based64 ascii string by your self.</p>
8804
8806
</div>
8805
8807
</div>
8806
8808
</div>
@@ -8814,24 +8816,18 @@ <h3 id="Step-7:-Revoke-Token-to-ending-the-session.">Step 7: Revoke Token to end
<spanclass="n">clientId_bytes</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s1">'</span><spanclass="si">{</span><spanclass="n">clientId</span><spanclass="si">}</span><spanclass="s1">:'</span><spanclass="o">.</span><spanclass="n">encode</span><spanclass="p">(</span><spanclass="s1">'ascii'</span><spanclass="p">)</span><spanclass="c1">#Please be noticed ":" string after the app-key</span>
Copy file name to clipboardExpand all lines: RDP-Generic-CFS.ipynb
+11-13Lines changed: 11 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1077,7 +1077,7 @@
1077
1077
"\n",
1078
1078
"The API requires the following HTTP Header and Credential parameter information:\n",
1079
1079
"- Header: \n",
1080
-
" * Authorization = ```Basic <App Key+\":\" in Base64>```\n",
1080
+
" * Authorization = ```Basic <App Key+\":\" in Base64 format>```\n",
1081
1081
"\n",
1082
1082
"- Body parameter\n",
1083
1083
" * token: The current ```Access Token``` value from the previous RDP Authentication call\n",
@@ -1101,7 +1101,11 @@
1101
1101
"\n",
1102
1102
"**Note**: \n",
1103
1103
"- Please be noticed **\":\"** string after the **App Key**. \n",
1104
-
"- The ```/revoke``` endpoint does not use the ```password``` in a Basic Authorization, so we need to send empty password in ```AppKey:``` format."
1104
+
"- The ```/revoke``` endpoint does not use the ```password``` in a Basic Authorization, so we need to send empty password in ```AppKey:``` format.\n",
1105
+
"\n",
1106
+
"I am demonstrating with the Python [requests](https://requests.readthedocs.io/) library. We can use the ```auth(clientid,'')``` to the ```requests.post``` function, and the library handles the base64 conversion for us.\n",
1107
+
"\n",
1108
+
"If you are using other languages or libraries (like C#), you may need to convert the ```App-Key:``` to based64 ascii string by your self.\n"
1105
1109
]
1106
1110
},
1107
1111
{
@@ -1121,24 +1125,18 @@
1121
1125
"source": [
1122
1126
"#step 7 - Revoking Token\n",
1123
1127
"\n",
1124
-
"import base64\n",
1125
-
"\n",
1126
-
"clientId_bytes = f'{clientId}:'.encode('ascii') #Please be noticed \":\" string after the app-key\n",
0 commit comments