Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [JavaPackage="org.chromium.webauth.mojom"] | |
| 6 module webauth.mojom; | |
| 7 | |
| 8 // This file describes the communication between the WebAuthentication renderer | |
| 9 // implementation and browser-side implementations to create scoped credentials | |
| 10 // and use already-created credentials to get assertions. | |
| 11 // See https://w3c.github.io/webauthn/. | |
| 12 | |
| 13 // The public key and attestation that is returned by an authenticator's | |
| 14 // call to makeCredential. | |
| 15 struct ScopedCredentialInfo { | |
| 16 array<uint8> client_data; | |
| 17 array<uint8> attestation; | |
| 18 }; | |
| 19 | |
| 20 // Information about the relying party and the user account held by that | |
| 21 // relying party. This information is used by the authenticator to create | |
| 22 // or retrieve an appropriate scoped credential for this account. | |
| 23 struct RelyingPartyAccount { | |
| 24 string relying_party_display_name; | |
| 25 string display_name; | |
| 26 string id; | |
| 27 string name; | |
| 28 string image_url; | |
| 29 }; | |
| 30 | |
| 31 // Parameters that are used to generate an appropriate scoped credential. | |
| 32 struct ScopedCredentialParameters { | |
| 33 ScopedCredentialType type; | |
| 34 // TODO(kpaulhamus): add AlgorithmIdentifier algorithm; | |
| 35 }; | |
| 36 | |
| 37 // Optional parameters that are used during makeCredential. | |
| 38 struct ScopedCredentialOptions { | |
| 39 int32 timeout_seconds; | |
|
dcheng
2017/04/25 12:52:14
Mind adding a todo to use something like mojo.comm
kpaulhamus
2017/05/03 17:00:45
Yeah, the TODO is present in CL#2 (you made the sa
| |
| 40 string relying_party_id; | |
| 41 array<ScopedCredentialDescriptor> exclude_list; | |
| 42 // TODO(kpaulhamus): add Extensions | |
| 43 }; | |
| 44 | |
| 45 enum ScopedCredentialType { | |
| 46 SCOPEDCRED, | |
| 47 }; | |
| 48 | |
| 49 // Describes the credentials that the relying party already knows about for | |
| 50 // the given account. If any of these are known to the authenticator, | |
| 51 // it should not create a new credential. | |
| 52 struct ScopedCredentialDescriptor { | |
| 53 ScopedCredentialType type; | |
| 54 array<uint8> id; | |
| 55 array<Transport> transports; | |
| 56 }; | |
| 57 | |
| 58 enum Transport { | |
| 59 USB, | |
| 60 NFC, | |
| 61 BLE, | |
| 62 }; | |
| 63 | |
| 64 // Interface to direct authenticators to create or use a scoped credential. | |
| 65 interface Authenticator { | |
| 66 // Gets the credential info for a new credential created by an authenticator | |
| 67 // for the given relying party and account. | |
| 68 MakeCredential(RelyingPartyAccount account_information, | |
| 69 array<ScopedCredentialParameters> crypto_parameters, | |
| 70 array<uint8> attestation_challenge, | |
| 71 ScopedCredentialOptions? options) | |
| 72 => (array<ScopedCredentialInfo> scoped_credentials); | |
| 73 }; | |
| OLD | NEW |