summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/credentialmanager/otp_credential.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/credentialmanager/otp_credential.h')
-rw-r--r--chromium/third_party/blink/renderer/modules/credentialmanager/otp_credential.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/modules/credentialmanager/otp_credential.h b/chromium/third_party/blink/renderer/modules/credentialmanager/otp_credential.h
new file mode 100644
index 00000000000..199d1b3190e
--- /dev/null
+++ b/chromium/third_party/blink/renderer/modules/credentialmanager/otp_credential.h
@@ -0,0 +1,35 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_CREDENTIALMANAGER_OTP_CREDENTIAL_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_CREDENTIALMANAGER_OTP_CREDENTIAL_H_
+
+#include "third_party/blink/renderer/modules/credentialmanager/credential.h"
+#include "third_party/blink/renderer/modules/modules_export.h"
+#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
+
+namespace blink {
+
+// OtpCredentials represents credentials for when the otp is requested
+// through the credential manager. It stores the one-time-passcode (otp) that
+// is retrieved from SMS by the browser.
+class MODULES_EXPORT OTPCredential final : public Credential {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ explicit OTPCredential(const String& code);
+
+ // Credential:
+ bool IsOTPCredential() const override;
+
+ // OTPCredential.idl
+ const String& code() const { return code_; }
+
+ private:
+ String code_;
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_CREDENTIALMANAGER_OTP_CREDENTIAL_H_