CCF
Loading...
Searching...
No Matches
http_consts.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5namespace ccf
6{
7 namespace http
8 {
9 namespace headers
10 {
11 // All HTTP headers are expected to be lowercase
12 static constexpr auto ACCEPT = "accept";
13 static constexpr auto ALLOW = "allow";
14 static constexpr auto AUTHORIZATION = "authorization";
15 static constexpr auto CACHE_CONTROL = "cache-control";
16 static constexpr auto CONTENT_LENGTH = "content-length";
17 static constexpr auto CONTENT_RANGE = "content-range";
18 static constexpr auto CONTENT_TYPE = "content-type";
19 static constexpr auto DATE = "date";
20 static constexpr auto DIGEST = "digest";
21 static constexpr auto HOST = "host";
22 static constexpr auto LOCATION = "location";
23 static constexpr auto RANGE = "range";
24 static constexpr auto ETAG = "etag";
25 static constexpr auto IF_NONE_MATCH = "if-none-match";
26 static constexpr auto REPR_DIGEST = "repr-digest";
27 static constexpr auto RETRY_AFTER = "retry-after";
28 static constexpr auto TRAILER = "trailer";
29 static constexpr auto WANT_REPR_DIGEST = "want-repr-digest";
30 static constexpr auto WWW_AUTHENTICATE = "www-authenticate";
31
32 static constexpr auto CCF_TX_ID = "x-ms-ccf-transaction-id";
33 static constexpr auto CCF_SNAPSHOT_NAME = "x-ms-ccf-snapshot-name";
34 static constexpr auto CCF_LEDGER_CHUNK_NAME =
35 "x-ms-ccf-ledger-chunk-name";
36 }
37
38 namespace headervalues::contenttype
39 {
40 static constexpr auto JSON = "application/json";
41 static constexpr auto TEXT = "text/plain";
42 static constexpr auto OCTET_STREAM = "application/octet-stream";
43 static constexpr auto COSE = "application/cose";
44 static constexpr auto JAVASCRIPT = "text/javascript";
45 static constexpr auto CBOR = "application/cbor";
46 }
47
48 namespace auth
49 {
50 static constexpr auto DIGEST_SHA256 = "SHA-256";
51
52 static constexpr auto SIGN_AUTH_SCHEME = "Signature";
53 static constexpr auto SIGN_PARAMS_KEYID = "keyId";
54 static constexpr auto SIGN_PARAMS_SIGNATURE = "signature";
55 static constexpr auto SIGN_PARAMS_ALGORITHM = "algorithm";
56 static constexpr auto SIGN_PARAMS_HEADERS = "headers";
57 static constexpr auto SIGN_ALGORITHM_ECDSA_SHA256 = "ecdsa-sha256";
58 static constexpr auto SIGN_ALGORITHM_HS_2019 = "hs2019";
59
60 static constexpr auto SIGN_HEADER_REQUEST_TARGET = "(request-target)";
61
62 static constexpr auto SIGN_PARAMS_DELIMITER = ",";
63 static constexpr auto SIGN_PARAMS_HEADERS_DELIMITER = " ";
64
65 static constexpr auto BEARER_AUTH_SCHEME = "Bearer";
66 }
67
68 static constexpr char const* required_signature_headers[] = {
69 auth::SIGN_HEADER_REQUEST_TARGET, ccf::http::headers::DIGEST};
70 }
71
72 namespace http2::headers
73 {
74 static constexpr auto PATH = ":path";
75 static constexpr auto STATUS = ":status";
76 static constexpr auto METHOD = ":method";
77 }
78}
Definition app_interface.h:13
Definition error_reporter.h:8