| 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 "core/dom/DOMArrayBuffer.h" | |
| 9 #include "modules/webauth/ScopedCredential.h" | |
| 10 #include "platform/bindings/ScriptWrappable.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* client_data, | |
| 22 DOMArrayBuffer* authenticator_data, | |
| 23 DOMArrayBuffer* signature) { | |
| 24 return new AuthenticationAssertion(credential, client_data, | |
| 25 authenticator_data, signature); | |
| 26 } | |
| 27 | |
| 28 AuthenticationAssertion(ScopedCredential* credential, | |
| 29 DOMArrayBuffer* client_data, | |
| 30 DOMArrayBuffer* authenticator_data, | |
| 31 DOMArrayBuffer* signature) | |
| 32 : credential_(credential), | |
| 33 client_data_(client_data), | |
| 34 authenticator_data_(authenticator_data), | |
| 35 signature_(signature) {} | |
| 36 | |
| 37 virtual ~AuthenticationAssertion() {} | |
| 38 | |
| 39 ScopedCredential* credential() const { return credential_.Get(); } | |
| 40 DOMArrayBuffer* clientData() const { return client_data_.Get(); } | |
| 41 DOMArrayBuffer* authenticatorData() const { | |
| 42 return authenticator_data_.Get(); | |
| 43 } | |
| 44 DOMArrayBuffer* signature() const { return signature_.Get(); } | |
| 45 | |
| 46 DEFINE_INLINE_TRACE() { | |
| 47 visitor->Trace(credential_); | |
| 48 visitor->Trace(client_data_); | |
| 49 visitor->Trace(authenticator_data_); | |
| 50 visitor->Trace(signature_); | |
| 51 } | |
| 52 | |
| 53 private: | |
| 54 const Member<ScopedCredential> credential_; | |
| 55 const Member<DOMArrayBuffer> client_data_; | |
| 56 const Member<DOMArrayBuffer> authenticator_data_; | |
| 57 const Member<DOMArrayBuffer> signature_; | |
| 58 }; | |
| 59 | |
| 60 } // namespace blink | |
| 61 | |
| 62 #endif // AuthenticationAssertion_h | |
| OLD | NEW |