| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_HTTP_MAC_SIGNATURE_H_ | 5 #ifndef NET_HTTP_MAC_SIGNATURE_H_ |
| 6 #define NET_HTTP_MAC_SIGNATURE_H_ | 6 #define NET_HTTP_MAC_SIGNATURE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "crypto/hmac.h" | 14 #include "crypto/hmac.h" |
| 15 #include "net/base/net_api.h" | 15 #include "net/base/net_export.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 // This class represents an HTTP MAC signature for use in the HTTP MAC | 19 // This class represents an HTTP MAC signature for use in the HTTP MAC |
| 20 // Authentication scheme. The current draft specification of this | 20 // Authentication scheme. The current draft specification of this |
| 21 // authentication scheme is located at the following URL: | 21 // authentication scheme is located at the following URL: |
| 22 // | 22 // |
| 23 // http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token | 23 // http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token |
| 24 // | 24 // |
| 25 class NET_TEST HttpMacSignature { | 25 class NET_EXPORT_PRIVATE HttpMacSignature { |
| 26 public: | 26 public: |
| 27 HttpMacSignature(); | 27 HttpMacSignature(); |
| 28 ~HttpMacSignature(); | 28 ~HttpMacSignature(); |
| 29 | 29 |
| 30 // Returns whether this information is valid. | 30 // Returns whether this information is valid. |
| 31 bool AddStateInfo(const std::string& id, | 31 bool AddStateInfo(const std::string& id, |
| 32 const base::Time& creation_date, | 32 const base::Time& creation_date, |
| 33 const std::string& mac_key, | 33 const std::string& mac_key, |
| 34 const std::string& mac_algorithm); | 34 const std::string& mac_algorithm); |
| 35 | 35 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 std::string host_; | 68 std::string host_; |
| 69 std::string port_; | 69 std::string port_; |
| 70 // TODO(abarth): body_hash_ | 70 // TODO(abarth): body_hash_ |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(HttpMacSignature); | 72 DISALLOW_COPY_AND_ASSIGN(HttpMacSignature); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace net | 75 } // namespace net |
| 76 | 76 |
| 77 #endif // NET_HTTP_MAC_SIGNATURE_H_ | 77 #endif // NET_HTTP_MAC_SIGNATURE_H_ |
| OLD | NEW |