Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1228)

Unified Diff: third_party/WebKit/public/platform/modules/webauth/authenticator.mojom

Issue 2788823002: Add the Mojo implementation of authenticator.mojom's MakeCredential. (Closed)
Patch Set: Export authenticator_impl Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/public/platform/modules/webauth/OWNERS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 85%
rename from components/webauth/authenticator.mojom
rename to third_party/WebKit/public/platform/modules/webauth/authenticator.mojom
index 1bf69a9796dadf18fd326a94ff19cd322f144fb5..bafa09ddfedcfe1e043fd7a1fee8335a8ce33aa9 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
};
@@ -81,9 +90,11 @@ interface Authenticator {
// Gets the credential info for a new credential created by an authenticator
// for the given relying party and account.
// |attestation_challenge| is a blob passed from the relying party server.
+ // [ScopedCredentialInfo] will only be set if status == SUCCESS.
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);
};
« no previous file with comments | « third_party/WebKit/public/platform/modules/webauth/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698