@@ -382,7 +382,6 @@ type UserReportRequest struct {
382
382
}
383
383
384
384
// UserReportResponse is the reply from a UserReportRequest.
385
- //
386
385
type UserReportResponse struct {
387
386
Padding Padding `json:"padding"`
388
387
@@ -398,33 +397,40 @@ type UserReportResponse struct {
398
397
ErrorCode string `json:"errorCode,omitempty"`
399
398
}
400
399
401
- // VerifyCodeRequest is the request structure for exchanging a short term Verification Code
402
- // (OTP) for a long term token (a JWT) that can later be used to sign TEKs.
403
- //
404
- // 'code' is either the issued short code or long code issued to the user. Either one is
405
- // acceptable. Note that they normally have different expiry times.
406
- // 'accept' is a list of accepted test types by the client. Acceptable values are
407
- // - ["confirmed"]
408
- // - ["confirmed", "likely"] == ["likely"]
409
- // - ["confirmed", "likely", "negative"] == ["negative"]
410
- // These values form a hierarchy, if a client will accept 'likely' they must accept
411
- // both confirmed and likely. 'negative' indicates you accept confirmed, likely, and negative.
412
- // A client can pass in the complete list they accept or the "highest" value they can accept.
413
- // If this value is omitted or is empty, the client agrees to accept ALL possible
414
- // test types, including test types that may be introduced in the future.
415
- // The special type of test, '"user-report"' can be added safely to any of the other types.
416
- //
417
- // The nonce must be provided when validating a self report key.
400
+ // VerifyCodeRequest is the request structure for exchanging a short term
401
+ // Verification Code (OTP) for a long term token (a JWT) that can later be used
402
+ // to sign TEKs.
418
403
//
419
404
// Requires API key in a HTTP header, X-API-Key: APIKEY
420
405
type VerifyCodeRequest struct {
421
406
Padding Padding `json:"padding"`
422
407
423
- VerificationCode string `json:"code"`
424
- AcceptTestTypes []string `json:"accept"`
408
+ // VerificationCode (code) is either the issued short code or long code issued
409
+ // to the user. Either one is acceptable. Note that they normally have
410
+ // different expiry times.
411
+ VerificationCode string `json:"code"`
412
+
413
+ // AcceptTestTypes (accept) is a list of accepted test types by the client.
414
+ // Acceptable values are:
415
+ //
416
+ // - ["confirmed"]
417
+ // - ["confirmed", "likely"] == ["likely"]
418
+ // - ["confirmed", "likely", "negative"] == ["negative"]
419
+ //
420
+ // These values form a hierarchy, if a client will accept 'likely' they must
421
+ // accept both confirmed and likely. 'negative' indicates you accept
422
+ // confirmed, likely, and negative. A client can pass in the complete list
423
+ // they accept or the "highest" value they can accept. If this value is
424
+ // omitted or is empty, the client agrees to accept ALL possible test types,
425
+ // including test types that may be introduced in the future.
426
+ //
427
+ // The special type of test, '"user-report"' can be added safely to any of the
428
+ // other types.
429
+ AcceptTestTypes []string `json:"accept"`
425
430
426
- // Optional: If present must be the same nonce that was used to request the verification code.
427
- // base64 encoded.
431
+ // Nonce (nonce) If present must be the same nonce that was used to request
432
+ // the verification code. base64 encoded. The nonce must be provided when
433
+ // validating a self report key.
428
434
Nonce string `json:"nonce,omitempty"`
429
435
}
430
436
0 commit comments