Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/webauth/authenticator.mojom |
| diff --git a/components/webauth/authenticator.mojom b/third_party/WebKit/public/platform/modules/webauth/authenticator.mojom |
| similarity index 86% |
| rename from components/webauth/authenticator.mojom |
| rename to third_party/WebKit/public/platform/modules/webauth/authenticator.mojom |
| index 1bf69a9796dadf18fd326a94ff19cd322f144fb5..815df08254e889e1e57f07df9766aa0fd7950599 100644 |
| --- a/components/webauth/authenticator.mojom |
| +++ b/third_party/WebKit/public/platform/modules/webauth/authenticator.mojom |
| @@ -10,6 +10,16 @@ module webauth.mojom; |
| // and use already-created credentials to get assertions. |
| // See https://w3c.github.io/webauthn/. |
| +enum AuthenticatorStatus { |
| + SUCCESS, |
| + CANCELLED, |
| + UNKNOWN_ERROR, |
| + NOT_ALLOWED_ERROR, |
| + NOT_SUPPORTED_ERROR, |
| + SECURITY_ERROR, |
| + NOT_IMPLEMENTED, |
| +}; |
| + |
| // The public key and attestation that is returned by an authenticator's |
| // call to makeCredential. |
| struct ScopedCredentialInfo { |
| @@ -24,7 +34,6 @@ struct ScopedCredentialInfo { |
| // relying party. This information is used by the authenticator to create |
| // or retrieve an appropriate scoped credential for this account. |
| // These fields take arbitrary input. |
| - |
| struct RelyingPartyAccount { |
| // Friendly name of the Relying Party, e.g. "Acme Corporation" |
| string relying_party_display_name; |
| @@ -34,10 +43,10 @@ struct RelyingPartyAccount { |
| // per authenticator and Relying Party. |
| string id; |
| // Detailed name for the account, e.g. john.p.smith@example.com |
| - string name; |
| + string? name; |
| // User image, if any. |
| - // Todo make this url.mojom.Url in a followup CL |
| - string image_url; |
| + // TODO(kpaulhamus): make this url.mojom.Url in a followup CL |
| + string? image_url; |
| }; |
| // Parameters that are used to generate an appropriate scoped credential. |
| @@ -49,8 +58,8 @@ struct ScopedCredentialParameters { |
| // Optional parameters that are used during makeCredential. |
| struct ScopedCredentialOptions { |
| //TODO(kpaulhamus): Make this mojo.common.mojom.TimeDelta in followup CL |
| - int32 timeout_seconds; |
| - string relying_party_id; |
| + double adjusted_timeout; |
| + string? relying_party_id; |
| array<ScopedCredentialDescriptor> exclude_list; |
| // TODO(kpaulhamus): add Extensions |
| }; |
| @@ -84,6 +93,7 @@ interface Authenticator { |
| 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); |
|
dcheng1
2017/06/29 05:12:17
Drive-by: please document how/when scoped_credenti
|
| }; |