add spec for refresh tokens
This commit is contained in:
parent
fd2d5b8a49
commit
1f81587154
4 changed files with 235 additions and 23 deletions
|
@ -1,5 +1,6 @@
|
|||
# Copyright 2016 OpenMarket Ltd
|
||||
# Copyright 2018 New Vector Ltd
|
||||
# Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -133,6 +134,11 @@ paths:
|
|||
description: |-
|
||||
A display name to assign to the newly-created device. Ignored
|
||||
if `device_id` corresponds to a known device.
|
||||
refresh_token:
|
||||
type: boolean
|
||||
description: |-
|
||||
If true, the client supports refresh tokens.
|
||||
x-addedInMatrixVersion: "1.3"
|
||||
required: ["type"]
|
||||
|
||||
responses:
|
||||
|
@ -142,6 +148,8 @@ paths:
|
|||
application/json: {
|
||||
"user_id": "@cheeky_monkey:matrix.org",
|
||||
"access_token": "abc123",
|
||||
"refresh_token": "def456",
|
||||
"expires_in_ms": 60000,
|
||||
"device_id": "GHTYAJCE",
|
||||
"well_known": {
|
||||
"m.homeserver": {
|
||||
|
@ -163,6 +171,23 @@ paths:
|
|||
description: |-
|
||||
An access token for the account.
|
||||
This access token can then be used to authorize other requests.
|
||||
refresh_token:
|
||||
type: string
|
||||
description: |-
|
||||
A refresh token for the account. This token can be used to
|
||||
obtain a new access token when it expires by calling the
|
||||
`/refresh` endpoint.
|
||||
x-addedInMatrixVersion: "1.3"
|
||||
expires_in_ms:
|
||||
type: integer
|
||||
description: |-
|
||||
The lifetime of the access token, in milliseconds. Once
|
||||
the access token has expired a new access token can be
|
||||
obtained by using the provided refresh token. If no
|
||||
refresh token is provided, the client will need re-log in
|
||||
to obtain a new access token. If not given, the client can
|
||||
assume that the access token will not expire.
|
||||
x-addedInMatrixVersion: "1.3"
|
||||
home_server:
|
||||
type: string
|
||||
description: |-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue