Ir al contenido
GitHub

Rotate Access Token

POST
/token/{id}
curl --request POST \
--url https://auth.interledger-test.dev/token/example \
--header 'Authorization: <Authorization>'

Management endpoint to rotate access token.

id
required
string

The unique reference of the access token to be managed.

OK

Media type application/json
object
access_token
required
access_token

A single access token or set of access tokens that the client instance can use to call the RS on behalf of the RO.

object
value
required

The value of the access token as a string. The value is opaque to the client instance. The value SHOULD be limited to ASCII characters to facilitate transmission over HTTP headers within other protocols without requiring additional encoding.

string
manage
required

The management URI for this access token. This URI MUST NOT include the access token value and SHOULD be different for each access token issued in a request.

string format: uri
expires_in

The number of seconds in which the access will expire. The client instance MUST NOT use the access token past this time. An RS MUST NOT accept an access token past this time.

integer
access
required

A description of the rights associated with this access token.

Array
<= 3 items unique items
One of:
access-incoming
object
type
required

The type of resource request as a string. This field defines which other fields are allowed in the request object.

string
Allowed values: incoming-payment
actions
required

The types of actions the client instance will take at the RS as an array of strings.

Array<string>
unique items
Allowed values: create complete read read-all list list-all
identifier

A string identifier indicating a specific resource at the RS.

string format: uri
Examples
Example New access token
{
"access_token": {
"value": "OZB8CDFONP219RP1LT0OS9M2PMHKUR64TB8N6BW7",
"manage": "https://auth.interledger-test.dev/token/8f69de01-5bf9-4603-91ed-eeca101081f1",
"expires_in": 3600,
"access": [
{
"type": "outgoing-payment",
"actions": [
"create",
"read"
],
"identifier": "https://ilp.interledger-test.dev/alice",
"limits": {
"interval": "R12/2019-08-24T14:15:22Z/P1M",
"receiver": "https://ilp.interledger-test.dev/bob/incoming-payments/48884225-b393-4872-90de-1b737e2491c2",
"debitAmount": {
"value": "500",
"assetCode": "USD",
"assetScale": 2
}
}
}
]
}
}

Bad Request

Media type application/json
Invalid rotation
object
error
object
description
string
code
string
Allowed values: invalid_rotation
Example
{
"error": {
"code": "invalid_rotation"
}
}

Unauthorized

Media type application/json
Invalid client
object
error
object
description
string
code
string
Allowed values: invalid_client
Example
{
"error": {
"code": "invalid_client"
}
}

Not Found

Media type application/json
Invalid rotation
object
error
object
description
string
code
string
Allowed values: invalid_rotation
Example
{
"error": {
"code": "invalid_rotation"
}
}

Internal Server Error

Media type application/json
Request denied
object
error
object
description
string
code
string
Allowed values: request_denied
Example
{
"error": {
"code": "request_denied"
}
}