File: remote_webauthn.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (109 lines) | stat: -rw-r--r-- 3,431 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package remoting.protocol;

// Composite message type for messages sent over the remote-webauthn data
// channel.
// Next ID: 10
message RemoteWebAuthn {
  // Message that represents a DOMException, yielded by the remote request
  // during a Create or Get request.
  // Next ID: 3
  message ExceptionDetails {
    optional string name = 1;
    optional string message = 2;
  }

  // Requests the client to handle a call to
  // PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable().
  message IsUvpaaRequest {}

  // Response for IsUvpaaRequest.
  // Next ID: 2
  message IsUvpaaResponse { optional bool is_available = 1; }

  // Requests the client to handle a navigator.credentials.create() call.
  // Next ID: 2
  message CreateRequest {
    // A JSON serialized representation of PublicKeyCredentialCreationOptions
    // passed to navigator.credentials.create().
    optional string request_details_json = 1;
  }

  // Response for CreateRequest.
  // Next ID: 3
  message CreateResponse {
    // If neither of the fields is set, it means that the remote create() call
    // has yielded `null`, which is still a valid response according to the
    // spec.
    oneof result {
      // The `DOMException`, if any, yielded by the remote request.
      ExceptionDetails error = 1;

      // A JSON serialized representation of the `PublicKeyCredential`
      // (https://w3c.github.io/webauthn/#publickeycredential), if any.
      string response_json = 2;
    }
  }

  // Requests the client to handle a navigator.credentials.get() call.
  // Next ID: 2
  message GetRequest {
    // A JSON serialized representation of CredentialRequestOptions passed to
    // navigator.credentials.get().
    optional string request_details_json = 1;
  }

  // Response for GetRequest.
  // Next ID: 3
  message GetResponse {
    // If neither of the fields is set, it means that the remote get() call
    // has yielded `null`, which is still a valid response according to the
    // spec.
    oneof result {
      // The `DOMException`, if any, yielded by the remote request.
      ExceptionDetails error = 1;

      // A JSON serialized representation of the `PublicKeyCredential`
      // (https://w3c.github.io/webauthn/#publickeycredential), if any.
      string response_json = 2;
    }
  }

  // Requests the client to abort an ongoing Create or Get request.
  // The |id| field of this message should be set to the same value as the
  // to-be-canceled GetRequest/CreateRequest's |id| field.
  message CancelRequest {}

  // Response for CancelRequest.
  // Next ID: 2
  message CancelResponse {
    // Boolean indicating whether the request has been successfully canceled.
    // If this is true, no future CreateResponse/GetResponse will be delivered
    // for the same |id|.
    optional bool was_canceled = 1;
  }

  // ID used to multiplex requests.
  optional uint64 id = 1;

  oneof message {
    IsUvpaaRequest is_uvpaa_request = 2;
    IsUvpaaResponse is_uvpaa_response = 3;

    CreateRequest create_request = 4;
    CreateResponse create_response = 5;

    CancelRequest cancel_request = 6;
    CancelResponse cancel_response = 7;

    GetRequest get_request = 8;
    GetResponse get_response = 9;
  }
}