Skip to content

Commit

Permalink
DOC: add authorizations description and redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafał Lisowski committed Jul 20, 2020
1 parent 249f95a commit a1840ed
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
{
"name": "Spaces",
"description": "Everything about Space"
},
{
"name": "Authorizations",
"description": "The endpoints provided by the Authorizations API are **only accessible via Basic authentication with email and password**.\n\nWhen creating a new authorization, the new access token for this authorization will be returned in the immediate response but not later, due to security reasons. When accessing authorizations later, you will only see the last eight chars of the token in plain text (`token_last_eight`) and the SHA256 digest of the token for reference (`hashed_token`).\n\nFor instructions on how authorization in general works, see our [Auth Guide](#authentication).\n\n### Scopes\n\nWhen creating or updating an OAuth authorization, you can define a list of scopes to limit the access that can be performed by that authorization.\n\n#### Available Scopes\n\n<div class=\"table-responsive\">\n <table class=\"basic-table\">\n <thead>\n <tr class=\"basic-table__row basic-table__row--header\">\n <th class=\"basic-table__cell basic-table__cell--header\">Scope</th>\n <th class=\"basic-table__cell basic-table__cell--header\">Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"basic-table__cell\"><code>read</code></td>\n <td class=\"basic-table__cell\">Read projects, locales, keys, translations, orders</td>\n </tr>\n <tr>\n <td class=\"basic-table__cell\"><code>write</code></td>\n <td class=\"basic-table__cell\">Write projects, locales, keys, translations but not orders</td>\n </tr>\n <tr>\n <td class=\"basic-table__cell\"><code>orders.create</code></td>\n <td class=\"basic-table__cell\">Create and confirm orders</td>\n </tr>\n <tr>\n <td class=\"basic-table__cell\"><code>team.manage</code></td>\n <td class=\"basic-table__cell\">Manage invitations and members</td>\n </tr>\n </tbody>\n </table>\n</div>\n"
}
],
"x-tagGroups": [
Expand Down
42 changes: 42 additions & 0 deletions main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,48 @@ security:
tags:
- name: Spaces
description: Everything about Space
- name: Authorizations
description: |
The endpoints provided by the Authorizations API are **only accessible via Basic authentication with email and password**.
When creating a new authorization, the new access token for this authorization will be returned in the immediate response but not later, due to security reasons. When accessing authorizations later, you will only see the last eight chars of the token in plain text (`token_last_eight`) and the SHA256 digest of the token for reference (`hashed_token`).
For instructions on how authorization in general works, see our [Auth Guide](#authentication).
### Scopes
When creating or updating an OAuth authorization, you can define a list of scopes to limit the access that can be performed by that authorization.
#### Available Scopes
<div class="table-responsive">
<table class="basic-table">
<thead>
<tr class="basic-table__row basic-table__row--header">
<th class="basic-table__cell basic-table__cell--header">Scope</th>
<th class="basic-table__cell basic-table__cell--header">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="basic-table__cell"><code>read</code></td>
<td class="basic-table__cell">Read projects, locales, keys, translations, orders</td>
</tr>
<tr>
<td class="basic-table__cell"><code>write</code></td>
<td class="basic-table__cell">Write projects, locales, keys, translations but not orders</td>
</tr>
<tr>
<td class="basic-table__cell"><code>orders.create</code></td>
<td class="basic-table__cell">Create and confirm orders</td>
</tr>
<tr>
<td class="basic-table__cell"><code>team.manage</code></td>
<td class="basic-table__cell">Manage invitations and members</td>
</tr>
</tbody>
</table>
</div>
x-tagGroups:
- name: Core Resources
Expand Down
8 changes: 8 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@
to = "https://developers.phrase.com/api/"
status = 301
force = false

# redirects for RapiDocs

[[redirects]]
from = "https://developers.phrase.com/api/#authorizations"
to = "https://developers.phrase.com/api/#tag--Authorizations"
status = 301
force = false

0 comments on commit a1840ed

Please sign in to comment.