WARNING: This document is Work in Progress. Attempts at implementations are encouraged and will be supported. Reviews and comments are also welcome.
The following RFCs are prerequisites to this document:
- 2119 - Key words for use in RFCs to Indicate Requirement Levels
- 2606 - Reserved Top Level DNS Names
- 8174 - Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words
The following spec documents are prerequisites to this document:
This document describes the API that can be used in the scope of Identity exchanges between a client and a server. Client and Server are roles, not implementations. A server implementation may be a client in the scope of an exchange with another server implementation.
All the endpoints MUST be prefixed with /identity
.
TBC
TBC
Via .well-known
at /.well-known/grid/identity
With format:
{
"v": "0",
"api": [
{
"base_url": "https://example.org/_grid/identity" # Top domain style
}
{
"base_url": "https://grid.example.org" # Sub domain style
}
]
}
Top level keys define the entry.
api
is an array of objects containing the following key(s):
Key | Purpose |
---|---|
base_url |
Mandatory. Base URL to the API without trailing / |
Clients need to try to use them in order until one server reply. Caching of data is controlled via regular HTTP headers, but should not be cached between client restarts.
Using SRV
DNS records with prefix _grid._tcp.
Any TLS negotiation will use the hostname indicated as the target. Any Grid deployment SHOULD use DNSSEC. Servers implementations MAY refuse to communicate with insecure DNS setups at their own discretion.
Credentials: MAY
Get the support version of the API from the server.
Status: 200
Body:
{
"api": [
"v0",
"arbitrary.version.v34032"
],
"server": {
"name": "Awesome-Grid-Data-Server-Implementation",
"version": "v0.0.1-WE_ARE_SUPER_ALPHA"
}
}
Credentials: MAY
Check if the v0
API is available. MAY act as a ping to the server.
Status: 200
Body:
{}
Credentials: MUST NOT
Perform login to get an access token.
See Concepts: API Authentication.
If success:
Status: 200
Body:
{
"token": "abclfkskfrokfo43423"
}
Credentials: MUST
Perform a logout for this session.
If success:
Status: 200
Body:
{}
List all available identifiers.
No options.
Status: 200 Body:
{
"items": [
"@userID-James",
"@userID-Bond"
]
}
Get information about a specific identifier.
List data servers linked to the identifier.
Lookup the ID of a user using a 3PID.
Body:
{
"identifier": {
"type": "g.id.net.grid.alias",
"value": "@[email protected]",
}
}
Status: 200 Body:
{
"id": ":VGhpc0lzTWUsSm9obiE"
}
Not found: 404
with a standard error body using errcode
value of G_NOT_FOUND
.