You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
* Rotate your keys for a given session. The `session_id` in the supplied `csr` must correspond to the
26
+
* session token used in the `authorization`-Header.
27
+
* @paramcsr A new [certificate signing request (CSR)](/Protocol%20Specifications/core/#71-home-server-signed-certificates-for-public-client-identity-keys-id-cert) with the same session ID
28
+
* @returns Contains your new ID-Cert, along with a new session token.
29
+
*/
30
+
oprotateIdCert(@bodycsr:string;): {
31
+
@doc("Contains your new ID-Cert in PEM encoding, along with a new session token.")
32
+
@statusCodestatusCode:201;
33
+
@bodynewIdCert: {
34
+
@doc("The generated [ID-Cert](/Protocol%20Specifications/core/#71-home-server-signed-certificates-for-public-client-identity-keys-id-cert) in PEM format.")
35
+
@example("------BEGIN CERTIFICATE------...")
36
+
id_cert:string,
37
+
@doc("An authorization secret, called a \"token\", valid for this `id_cert`.")
38
+
token:string
39
+
}
40
+
};
41
+
42
+
@route("/session/keymaterial")
43
+
@summary("Upload encrypted private key material")
44
+
@added(Version.`v1.0-alpha.1`)
45
+
@post
46
+
/**
47
+
* Upload encrypted private key material to the server for later retrieval. The size of
48
+
* the individual array elements must not exceed
49
+
* the server's maximum upload size for this route. This is usually not more than 10kb and can be as
50
+
* low as 800 bytes, depending on the server configuration.
51
+
* @parampkm Array of encrypted private key material objects.
52
+
*/
53
+
opuploadEncryptedPKM(@body@minItems(1) pkm:
54
+
polyproto.core.models.EncryptedPKM[]): {
55
+
@statusCodestatusCode:201;
56
+
} | {
57
+
@doc("Used, if the `serial_number` does not match any known ID-Cert from this actor.")
58
+
@statusCodestatusCode:404;
59
+
} | {
60
+
@doc("Status code for when the server already has key material for the given `serial_number`. The client would need to delete the existing key material before uploading new key material.")
61
+
@statusCodestatusCode:409;
62
+
} | {
63
+
@doc("Uploaded key material exceeds the server's maximum upload size.")
64
+
@statusCodestatusCode:413;
65
+
};
66
+
67
+
@route("/session/keymaterial")
68
+
@summary("Get encrypted private key material")
69
+
@added(Version.`v1.0-alpha.1`)
70
+
@get
71
+
/**
72
+
* Retrieve encrypted private key material from the server. The `serial_numbers`, if
73
+
* provided, must match the serial numbers of ID-Certs that the client has uploaded key
74
+
* material for. If no `serial_numbers` are provided, the server will return all key
* Request the server's public identity certificate.
158
+
* @returns The current ID-Cert of the server, or, if specified, the ID-Cert the server had
159
+
* at the specified time.
160
+
* @paramtimestamp An optional UNIX timestamp to retrieve the ID-Cert the server had at that
161
+
* point in time, instead of the current one.
162
+
*/
163
+
opserverIdCert(@querytimestamp?:uint64):string;
164
+
165
+
@route("/key/server")
166
+
@get
167
+
@added(Version.`v1.0-alpha.1`)
168
+
@summary("Get Server Public Key")
169
+
/**
170
+
* Request the server's public key.
171
+
* @returns The current public key of the server, or, if specified, the public key the server had
172
+
* at the specified time. The public key is being returned as a PEM encoded X.509
173
+
* `SubjectPublicKeyInfo`.
174
+
* @paramtimestamp An optional UNIX timestamp to retrieve the public key the server had at that
175
+
* point in time, instead of the current one.
176
+
*/
177
+
opserverKey(@querytimestamp?: {
178
+
timestamp:uint64
179
+
}):string;
180
+
181
+
@route("/idcert/actor")
182
+
@get
183
+
@added(Version.`v1.0-alpha.1`)
184
+
@summary("Get Actor ID-Cert(s)")
185
+
/**
186
+
* Request the ID-Certs of a specific actor. The specified actor must be registered on this server.
187
+
* @paramfid The ID of the actor whose ID-Cert(s) should be returned.
188
+
* @paramtimestamp An optional UNIX timestamp to retrieve the ID-Cert the actor had at that
189
+
* point in time, instead of the current one.
190
+
* @paramsession_id Optionally, return only the ID-Certs matching a specific `session_id`.
191
+
* @parambody timestamp: UNIX-Timestamp. If specified, the server will return the ID-Cert(s) which the actor had at the specified time. session_id: Request the ID-Cert for a specific session ID.
192
+
* @returns JSON-Array of Object(s), each object containing "id_cert" (PEM encoded ID-Cert) and "invalidated" (boolean). An ID-Cert is considered invalidated, if the server or actor choose to revoke the validity of the ID-Cert before the lifetime of the certificate was scheduled to end.
@doc("Whether this specific id_cert has been marked as invalidated by the server. An ID-Cert is considered invalidated, if the server or actor choose to revoke the validity of the ID-Cert before the lifetime of the certificate was scheduled to end.")
202
+
invalidated:boolean
203
+
}[]
204
+
};
205
+
206
+
@route("/session/idcert/extern")
207
+
@put
208
+
@added(Version.`v1.0-alpha.1`)
209
+
@useAuth(BearerAuth)
210
+
@summary("Update session ID-Cert")
211
+
/**
212
+
* Lets a foreign server know that the ID-Cert of this session has changed.
213
+
*/
214
+
opupdateSessionCert(@bodyid_cert:string): {
215
+
@statusCodestatusCode:201;
216
+
};
217
+
218
+
@route("/session")
219
+
@delete
220
+
@added(Version.`v1.0-alpha.1`)
221
+
@summary("Delete/Revoke Session")
222
+
@useAuth(BearerAuth)
223
+
/**
224
+
* Invalidate a session token by naming the session ID associated with it.
0 commit comments