Index: components/webauth/authenticator.mojom |
diff --git a/components/webauth/authenticator.mojom b/components/webauth/authenticator.mojom |
index 7f8ba4a742181b207e6de4cef7641ccea2377dd0..f9621e4bb831cf8bbd405ac97b57a19ce83490a3 100644 |
--- a/components/webauth/authenticator.mojom |
+++ b/components/webauth/authenticator.mojom |
@@ -5,18 +5,40 @@ |
[JavaPackage="org.chromium.webauth.mojom"] |
module webauth.mojom; |
+enum AuthenticatorStatus { |
+ SUCCESS, |
+ CANCELLED, |
+ UNKNOWN_ERROR, |
+ NOT_ALLOWED_ERROR, |
+ NOT_SUPPORTED_ERROR, |
+ SECURITY_ERROR, |
+}; |
+ |
struct ScopedCredentialInfo { |
array<uint8> client_data; |
array<uint8> attestation; |
}; |
+/* The rpDisplayName member contains the friendly name of the Relying Party, such as "Acme Corporation", "Widgets Inc" or "Awesome Site". |
+ |
+The displayName member contains the friendly name associated with the user account by the Relying Party, such as "John P. Smith". |
+ |
+The id member contains an identifier for the account, specified by the Relying Party. This is not meant to be displayed to the user. It is used by the Relying Party to control the number of credentials - an authenticator will never contain more than one credential for a given Relying Party under the same id. |
+ |
+The name member contains a detailed name for the account, such as "john.p.smith@example.com".*/ |
+ |
struct RelyingPartyAccount { |
+ // Friendly name of the Relying Party, e.g. "Acme Corporation" |
string rp_display_name; |
+ // Friendly name associated with the user account, e.g. "John P. Smith" |
string display_name; |
- string id; |
- string name; |
+ // Identifier for the account, corresponding to no more than one credential |
+ // per authenticator and Relying Party. |
+ string id; |
+ // Detailed name for the account, e.g. john.p.smith@example.com |
+ string? name; |
// TODO(kpaulhamus): Make this url.mojom.Url in followup CL |
- string image_url; |
+ string? image_url; |
}; |
struct ScopedCredentialParameters { |
@@ -25,9 +47,9 @@ struct ScopedCredentialParameters { |
}; |
struct ScopedCredentialOptions { |
- // TODO(kpaulhamus): Make this mojo.common.mojom.TimeDelta in followup CL |
- uint32 timeout_seconds; |
- string rp_id; |
+ //TODO(kpaulhamus): Make this mojo.common.mojom.TimeDelta in followup CL |
+ double adjusted_timeout; |
+ string? rp_id; |
array<ScopedCredentialDescriptor> exclude_list; |
// TODO(kpaulhamus): add Extensions |
}; |
@@ -48,10 +70,13 @@ enum Transport { |
BLE, |
}; |
+// TODO add comments everywhere |
+// |account_information|: |
interface Authenticator { |
- makeCredential(RelyingPartyAccount account_information, |
+ MakeCredential(RelyingPartyAccount account_information, |
array<ScopedCredentialParameters> crypto_parameters, |
array<uint8> attestation_challenge, |
- ScopedCredentialOptions? options) |
- => (array<ScopedCredentialInfo> scoped_credentials); |
+ ScopedCredentialOptions options) |
+ => (AuthenticatorStatus status, |
+ ScopedCredentialInfo? scoped_credential); |
}; |