mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Fixed API help page.
This commit is contained in:
parent
80199b3ba7
commit
9450ebd33c
@ -36,15 +36,13 @@
|
||||
<h4>OAuth or OpenID Connect</h4>
|
||||
<p>To authenticate with OAuth or OpenID, you will need to create a client in your <a href="@Url.SubRouteUrl("account", "User.ClientSettings")">Developer Settings</a> to authenticate against. Once created, you can interact with the authentication endpoint via any of the endpoints described in the <a href="https://auth.teknik.io/.well-known/openid-configuration">discovery document</a>.</p>
|
||||
<br />
|
||||
<br />
|
||||
<h4>OAuth2 token (sent in a header)</h4>
|
||||
<p>To authenticate with an Oauth Token, you need to generate one using the <a href="https://auth.teknik.io/connect/token">token endpoint</a>. To learn more about obtaining a token, you can </p>
|
||||
<code>curl -H "Authorization: token <i>OATH-TOKEN</i>" @Url.SubRouteUrl("api", "Api.Index")/v@(Config.ApiConfig.Version)/</code>
|
||||
<br />
|
||||
<br />
|
||||
For example, if you're accessing the API via cURL, the following command would associate the create paste with your account. Just replace <code><OAUTH-TOKEN></code> with your access token.
|
||||
<pre><code>$ curl -H <OAUTH-TOKEN> --data code="Test" @Url.SubRouteUrl("api", "API.v1.Paste")</code></pre>
|
||||
<br />
|
||||
<pre><code>$ curl -H "Authorization: token <OAUTH-TOKEN>"" --data code="Test" @Url.SubRouteUrl("api", "API.v1.Paste")</code></pre>
|
||||
<br />
|
||||
<h4>Auth Token (sent in a header)</h4>
|
||||
<p>To authenticate with an Auth Token, you can generate tokens in your <a href="@Url.SubRouteUrl("account", "User.AuthTokenSettings")">Developer Settings</a></p>
|
||||
@ -52,7 +50,9 @@
|
||||
<br />
|
||||
<br />
|
||||
For example, if you're accessing the API via cURL, the following command would associate the create paste with your account. Just replace <code><XXXXXXXXXXXXXXXXXXXX></code> with your Auth Token.
|
||||
<pre><code>$ curl -H "AuthToken <XXXXXXXXXXXXXXXXXXXX>"" --data code="Test" @Url.SubRouteUrl("api", "API.v1.Paste")</code></pre>
|
||||
<pre><code>$ curl -H "Authorization: AuthToken <XXXXXXXXXXXXXXXXXXXX>"" --data code="Test" @Url.SubRouteUrl("api", "API.v1.Paste")</code></pre>
|
||||
<br />
|
||||
<br />
|
||||
</p>
|
||||
<h3>Responses</h3>
|
||||
<p>
|
||||
|
Loading…
Reference in New Issue
Block a user