@@ -35,9 +35,9 @@ namespace polyproto.core.Routes.FederatedIdentity {
35
35
@ body newIdCert : {
36
36
@ doc ("The generated [ID-Cert](/Protocol%20Specifications/core/#71-home-server-signed-certificates-for-public-client-identity-keys-id-cert) in PEM format." )
37
37
@ example ("------BEGIN CERTIFICATE------..." )
38
- id_cert : string ;
38
+ idCert : string ;
39
39
40
- @ doc ("An authorization secret, called a \" session token\" , valid for this `id_cert `/session." )
40
+ @ doc ("An authorization secret, called a \" session token\" , valid for this `idCert `/session." )
41
41
token : string ;
42
42
};
43
43
};
@@ -54,7 +54,7 @@ namespace polyproto.core.Routes.FederatedIdentity {
54
54
@ added (Version .`v1.0-beta.3` )
55
55
@ post
56
56
op uploadEncryptedPKM (
57
- @ body @ minItems (1 ) pkm : polyproto .core .Models .EncryptedPKM [],
57
+ @ body @ minItems (1 ) pkm : polyproto .core .models .EncryptedPKM [],
58
58
):
59
59
| {
60
60
@ statusCode statusCode : 201 ;
@@ -87,7 +87,7 @@ namespace polyproto.core.Routes.FederatedIdentity {
87
87
@ get
88
88
op getEncryptedPKM (@ query serials ? : uint64 []): {
89
89
@ statusCode statusCode : 200 ;
90
- @ body encryptedPKMs : polyproto .core .Models .EncryptedPKM [];
90
+ @ body encryptedPKMs : polyproto .core .models .EncryptedPKM [];
91
91
} | {
92
92
@ doc ("Returned, if no `serial_numbers` are provided and the client has not uploaded any key material." )
93
93
@ statusCode
@@ -158,7 +158,7 @@ namespace polyproto.core.Routes.FederatedIdentity {
158
158
@ header (#{ name : "X-P2-Sensitive-Solution" })
159
159
sensitiveSolution : string ,
160
160
161
- @ query session_id : string ,
161
+ @ query sessionId : string ,
162
162
): {
163
163
@ statusCode statusCode : 204 ;
164
164
@@ -200,14 +200,14 @@ namespace polyproto.core.Routes.FederatedIdentity {
200
200
@ summary ("Get Server ID-Cert" )
201
201
op serverIdCert (
202
202
@ query timestamp ? : uint64 ,
203
- ): polyproto .core .Models .CacheableIDCert ;
203
+ ): polyproto .core .models .CacheableIDCert ;
204
204
205
205
/**
206
206
* Request the ID-Certs of a specific actor. The specified actor must be registered on this server.
207
207
* @ param fid The ID of the actor whose ID-Cert(s) should be returned.
208
208
* @ param notBefore : Return only ID-Certs from at or after a specific point in time. UNIX 64 bit timestamp.
209
209
* @ param notAfter : Return only ID-Certs from at or before a specific point in time. UNIX 64 bit timestamp.
210
- * @ param session_id Optionally, return only the ID-Certs matching a specific `session_id `.
210
+ * @ param sessionId Optionally, return only the ID-Certs matching a specific `sessionId `.
211
211
* @ returns JSON-Array of Object(s).
212
212
*/
213
213
@ route ("/idcert/actor" )
@@ -218,10 +218,10 @@ namespace polyproto.core.Routes.FederatedIdentity {
218
218
@ path fid : string ,
219
219
@ query notBefore ? : uint64 ,
220
220
@ query notAfter ? : uint64 ,
221
- @ query session_id ? : string ,
221
+ @ query sessionId ? : string ,
222
222
): {
223
223
@ statusCode statusCode : 200 ;
224
- @ body response : polyproto .core .Models .CacheableIDCert [];
224
+ @ body response : polyproto .core .models .CacheableIDCert [];
225
225
};
226
226
227
227
/**
@@ -235,26 +235,39 @@ namespace polyproto.core.Routes.FederatedIdentity {
235
235
@ added (Version .`v1.0-beta.3` )
236
236
@ useAuth (BearerAuth )
237
237
@ summary ("Update session ID-Cert" )
238
- op updateSessionCert (@ body id_cert : string ): {
238
+ op updateSessionCert (@ body idCert : string ): {
239
239
@ statusCode statusCode : 201 ;
240
240
} | {
241
241
@ statusCode statusCode : 400 ;
242
242
};
243
243
244
244
/**
245
245
* Authenticate on a foreign server, creating a session with an authentication token. Requires
246
- * completing a key trial for the ID-Cert the session is supposed to be generated for.
246
+ * completing a key trial for the ID-Cert of which the session is supposed to be generated for.
247
247
*/
248
248
@ route ("/session/auth" )
249
249
@ post
250
- @ added (Version .`v1.0-beta.3 ` )
250
+ @ added (Version .`v1.0-beta.4 ` )
251
251
@ summary ("Authenticate on a foreign server" )
252
252
op requestToken (
253
253
@ body
254
- completedChallengeString : polyproto .core .Models .KeyTrialCompleted ,
254
+ completedChallengeString : polyproto .core .models .KeyTrialCompleted ,
255
255
): {
256
256
@ body _ : string ;
257
257
@ statusCode statusCode : 200 ;
258
258
};
259
+
260
+ /**
261
+ * Manually request a KeyTrial, useful for obtaining a session token. Returns
262
+ * a key trial.
263
+ */
264
+ @ route ("/session/auth" )
265
+ @ get
266
+ @ added (Version .`v1.0-beta.3` )
267
+ @ summary ("Authenticate on a foreign server" )
268
+ op requestChallenge (): {
269
+ @ body _ : polyproto .core .models .KeyTrial ;
270
+ @ statusCode statusCode : 200 ;
271
+ };
259
272
}
260
273
}
0 commit comments