23namespace http_field_parsers
26namespace authorization_details
90 return (to << v.value);
100 return produce< token68_t >(
101 produce< std::string >(
188 using namespace authorization_details;
203 auto params_seq = maybe_empty_comma_separated_list_p< param_container_t >(
209 produce< param_value_t >(
219 return produce< authorization_value_t >(
223 produce< auth_param_t >(
256 to <<
'"' << v.value <<
'"';
265 return (to << v.name <<
'=' << v.value);
288 for(
const auto & param : c )
311 return (to << v.auth_scheme <<
' ' << v.auth_param);
Utilities for parsing values of http-fields.
A template for producer of charachers that satisfy some predicate.
Information about parsing error.
#define RESTINIO_NODISCARD
R visit(const Visitor &v, V1 const &arg1)
RESTINIO_NODISCARD auto maybe(Clauses &&... clauses)
A factory function to create an optional clause.
RESTINIO_NODISCARD auto symbol(char expected) noexcept
A factory function to create a clause that expects the speficied symbol, extracts it and then skips i...
RESTINIO_NODISCARD auto sequence(Clauses &&... clauses)
A factory function to create a sequence of subclauses.
RESTINIO_NODISCARD auto space() noexcept
A factory function to create a clause that expects a space, extracts it and then skips it.
RESTINIO_NODISCARD expected_t< typename Producer::result_type, parse_error_t > try_parse(string_view_t from, Producer producer)
Perform the parsing of the specified content by using specified value producer.
RESTINIO_NODISCARD auto repeat(std::size_t min_occurences, std::size_t max_occurences, Clauses &&... clauses)
A factory function to create repetitor of subclauses.
RESTINIO_NODISCARD auto skip() noexcept
A factory function to create a skip_consumer.
RESTINIO_NODISCARD auto as_result() noexcept
A factory function to create a as_result_consumer.
constexpr std::size_t N
A special marker that means infinite repetitions.
RESTINIO_NODISCARD auto to_container()
A factory function to create a to_container_consumer.
RESTINIO_NODISCARD auto symbol_p(char expected) noexcept
A factory function to create a symbol_producer.
RESTINIO_NODISCARD auto not_clause(Clauses &&... clauses)
A factory function to create a not_clause.
RESTINIO_NODISCARD auto any_symbol_p() noexcept
A factory function to create an any_symbol_producer.
RESTINIO_NODISCARD auto to_lower() noexcept
A factory function to create a to_lower_transformer.
RESTINIO_NODISCARD auto alternatives(Clauses &&... clauses)
A factory function to create an alternatives clause.
RESTINIO_NODISCARD auto convert(Converter &&converter)
A factory function to create convert_transformer.
RESTINIO_NODISCARD auto token68_symbol_p()
std::ostream & operator<<(std::ostream &to, const token68_t &v)
RESTINIO_NODISCARD auto token68_p()
std::ostream & operator<<(std::ostream &to, const authorization_value_t::param_value_t &v)
RESTINIO_NODISCARD auto ows() noexcept
A factory function to create an OWS clause.
RESTINIO_NODISCARD auto token_p() noexcept
A factory function to create a token_producer.
RESTINIO_NODISCARD auto quoted_string_p() noexcept
A factory function to create a quoted_string_producer.
nonstd::string_view string_view_t
nonstd::expected< T, E > expected_t
A preducate for symbol_producer_template that checks that a symbol can be used inside token68 from RF...
RESTINIO_NODISCARD bool operator()(const char actual) const noexcept
A structure for holding a value of token68 from RFC7235.
A storage for a parameter with a name and a value.
std::string name
The name of a parameter.
param_value_t value
The value of a parameter.
A storage for the value of a parameter.
value_form_t form
How this value was represented: as a token, or a quoted string?
std::string value
The value of a parameter.
Tools for working with the value of Authorization HTTP-field.
auth_param_t auth_param
A parameter for authorization.
std::string auth_scheme
A value of auth-scheme.
value_form_t
An indicator of the source form of the value of a parameter.
@ token
The value of a parameter was specified as token.
@ quoted_string
The value of a parameter was specified as quoted_string.
std::vector< param_t > param_container_t
Type of container for holding parameters.
static RESTINIO_NODISCARD expected_t< authorization_value_t, restinio::easy_parser::parse_error_t > try_parse(string_view_t what)
An attempt to parse Authorization HTTP-field.
static RESTINIO_NODISCARD auto make_parser()
A factory function for a parser of Authorization value.
A preducate for symbol_producer_template that checks that a symbol is an alpha or numeric.
RESTINIO_NODISCARD bool operator()(const char actual) const noexcept