OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #ifndef AuthenticationAssertion_h |
| 6 #define AuthenticationAssertion_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/dom/DOMArrayBuffer.h" |
| 10 #include "modules/webauth/ScopedCredential.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class AuthenticationAssertion final |
| 15 : public GarbageCollectedFinalized<AuthenticationAssertion>, |
| 16 public ScriptWrappable { |
| 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 |
| 19 public: |
| 20 static AuthenticationAssertion* create(ScopedCredential* credential, |
| 21 DOMArrayBuffer* clientData, |
| 22 DOMArrayBuffer* authenticatorData, |
| 23 DOMArrayBuffer* signature) { |
| 24 return new AuthenticationAssertion(credential, clientData, |
| 25 authenticatorData, signature); |
| 26 } |
| 27 |
| 28 AuthenticationAssertion(ScopedCredential* credential, |
| 29 DOMArrayBuffer* clientData, |
| 30 DOMArrayBuffer* authenticatorData, |
| 31 DOMArrayBuffer* signature) |
| 32 : m_credential(credential), |
| 33 m_clientData(clientData), |
| 34 m_authenticatorData(authenticatorData), |
| 35 m_signature(signature) {} |
| 36 |
| 37 virtual ~AuthenticationAssertion() {} |
| 38 |
| 39 ScopedCredential* credential() const { return m_credential.get(); } |
| 40 DOMArrayBuffer* clientData() const { return m_clientData.get(); } |
| 41 DOMArrayBuffer* authenticatorData() const { |
| 42 return m_authenticatorData.get(); |
| 43 } |
| 44 DOMArrayBuffer* signature() const { return m_signature.get(); } |
| 45 |
| 46 DEFINE_INLINE_TRACE() { |
| 47 visitor->trace(m_credential); |
| 48 visitor->trace(m_clientData); |
| 49 visitor->trace(m_authenticatorData); |
| 50 visitor->trace(m_signature); |
| 51 } |
| 52 |
| 53 private: |
| 54 const Member<ScopedCredential> m_credential; |
| 55 const Member<DOMArrayBuffer> m_clientData; |
| 56 const Member<DOMArrayBuffer> m_authenticatorData; |
| 57 const Member<DOMArrayBuffer> m_signature; |
| 58 }; |
| 59 |
| 60 } // namespace blink |
| 61 |
| 62 #endif // AuthenticationAssertion_h |
OLD | NEW |