aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-05-06 17:51:03 +0000
committerlambda <lain@soykaf.club>2019-05-06 17:51:03 +0000
commit6b79be4a06064b8bb54fe73c2ac768d10d52068b (patch)
treedb56c5118b7e853f27d5bd0d0782ab72f532d821 /docs
parentaacac9da0beddcf797958acca330747b8f2d1f06 (diff)
parent1040caf096347b638b9fda5b23fcccde87b32ede (diff)
downloadpleroma-6b79be4a06064b8bb54fe73c2ac768d10d52068b.tar.gz
Merge branch 'issue_800' into 'develop'
[#800] added ability renew access_token by refresh_token See merge request pleroma/pleroma!1045
Diffstat (limited to 'docs')
-rw-r--r--docs/api/differences_in_mastoapi_responses.md9
-rw-r--r--docs/config.md9
2 files changed, 16 insertions, 2 deletions
diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md
index 1350ace43..d3ba41b6a 100644
--- a/docs/api/differences_in_mastoapi_responses.md
+++ b/docs/api/differences_in_mastoapi_responses.md
@@ -1,6 +1,6 @@
# Differences in Mastodon API responses from vanilla Mastodon
-A Pleroma instance can be identified by "<Mastodon version> (compatible; Pleroma <version>)" present in `version` field in response from `/api/v1/instance`
+A Pleroma instance can be identified by "<Mastodon version> (compatible; Pleroma <version>)" present in `version` field in response from `/api/v1/instance`
## Flake IDs
@@ -80,3 +80,10 @@ Additional parameters can be added to the JSON body/Form data:
- `hide_favorites` - if true, user's favorites timeline will be hidden
- `show_role` - if true, user's role (e.g admin, moderator) will be exposed to anyone in the API
- `default_scope` - the scope returned under `privacy` key in Source subentity
+
+## Authentication
+
+*Pleroma supports refreshing tokens.
+
+`POST /oauth/token`
+Post here request with grant_type=refresh_token to obtain new access token. Returns an access token.
diff --git a/docs/config.md b/docs/config.md
index bbdc22688..d999952e1 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -474,7 +474,7 @@ Authentication / authorization settings.
* `oauth_consumer_template`: OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.
* `oauth_consumer_strategies`: the list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable.
-# OAuth consumer mode
+## OAuth consumer mode
OAuth consumer mode allows sign in / sign up via external OAuth providers (e.g. Twitter, Facebook, Google, Microsoft, etc.).
Implementation is based on Ueberauth; see the list of [available strategies](https://github.com/ueberauth/ueberauth/wiki/List-of-Strategies).
@@ -527,6 +527,13 @@ config :ueberauth, Ueberauth,
]
```
+## OAuth 2.0 provider - :oauth2
+
+Configure OAuth 2 provider capabilities:
+
+* `token_expires_in` - The lifetime in seconds of the access token.
+* `issue_new_refresh_token` - Keeps old refresh token or generate new refresh token when to obtain an access token.
+
## :emoji
* `shortcode_globs`: Location of custom emoji files. `*` can be used as a wildcard. Example `["/emoji/custom/**/*.png"]`
* `groups`: Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname and the value the location or array of locations. `*` can be used as a wildcard. Example `[Custom: ["/emoji/*.png", "/emoji/custom/*.png"]]`