Skip to content

Commit

Permalink
add Accept: application/json headers to examples
Browse files Browse the repository at this point in the history
for #18
  • Loading branch information
aaronpk committed Jul 7, 2018
1 parent 46dad45 commit bfa3933
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion public/source/index.php
Expand Up @@ -464,6 +464,7 @@
<pre class="example nohighlight"><?= htmlspecialchars(
'POST https://example.org/auth
Content-type: application/x-www-form-urlencoded
Accept: application/json
code=xxxxxxxx
&client_id=https://app.example.com/
Expand Down Expand Up @@ -617,6 +618,7 @@
<pre class="example nohighlight"><?= htmlspecialchars(
'POST https://example.org/token
Content-type: application/x-www-form-urlencoded
Accept: application/json
grant_type=authorization_code
&code=xxxxxxxx
Expand Down Expand Up @@ -644,6 +646,7 @@
<pre class="example nohighlight"><?= htmlspecialchars(
'POST https://example.org/auth
Content-type: application/x-www-form-urlencoded
Accept: application/json
code=xxxxxxxx
&client_id=https://app.example.com/
Expand Down Expand Up @@ -695,7 +698,8 @@
<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>

<pre class="example nohighlight">GET https://example.org/token
Authorization: Bearer xxxxxxxx</pre>
Authorization: Bearer xxxxxxxx
Accept: application/json</pre>

<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>

Expand Down Expand Up @@ -734,6 +738,7 @@

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

action=revoke
&token=xxxxxxxx</pre>
Expand Down

0 comments on commit bfa3933

Please sign in to comment.