Skip to content

Commit bfa3933

Browse files
committed
add Accept: application/json headers to examples
for #18
1 parent 46dad45 commit bfa3933

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

public/source/index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@
464464
<pre class="example nohighlight"><?= htmlspecialchars(
465465
'POST https://example.org/auth
466466
Content-type: application/x-www-form-urlencoded
467+
Accept: application/json
467468
468469
code=xxxxxxxx
469470
&client_id=https://app.example.com/
@@ -617,6 +618,7 @@
617618
<pre class="example nohighlight"><?= htmlspecialchars(
618619
'POST https://example.org/token
619620
Content-type: application/x-www-form-urlencoded
621+
Accept: application/json
620622
621623
grant_type=authorization_code
622624
&code=xxxxxxxx
@@ -644,6 +646,7 @@
644646
<pre class="example nohighlight"><?= htmlspecialchars(
645647
'POST https://example.org/auth
646648
Content-type: application/x-www-form-urlencoded
649+
Accept: application/json
647650
648651
code=xxxxxxxx
649652
&client_id=https://app.example.com/
@@ -695,7 +698,8 @@
695698
<p>If an external endpoint needs to verify that an access token is valid, it MUST make a GET request to the token endpoint containing an HTTP <code>Authorization</code> header with the Bearer Token according to [[!RFC6750]]. Note that the request to the endpoint will not contain any user-identifying information, so the external endpoint (e.g. Micropub endpoint) will need to know via out-of-band methods which token endpoint is in use.</p>
696699

697700
<pre class="example nohighlight">GET https://example.org/token
698-
Authorization: Bearer xxxxxxxx</pre>
701+
Authorization: Bearer xxxxxxxx
702+
Accept: application/json</pre>
699703

700704
<p>The token endpoint verifies the access token using (how this verification is done is up to the implementation), and returns information about the token:</p>
701705

@@ -734,6 +738,7 @@
734738

735739
<pre class="example nohighlight">POST https://example.org/token HTTP/1.1
736740
Content-Type: application/x-www-form-urlencoded
741+
Accept: application/json
737742

738743
action=revoke
739744
&token=xxxxxxxx</pre>

0 commit comments

Comments
 (0)