RESTinio
|
Namespaces | |
namespace | impl |
Classes | |
struct | params_t |
Parameters for bearer authentification. More... | |
Enumerations | |
enum class | extraction_error_t { no_auth_http_field , illegal_http_field_value , not_bearer_auth_scheme , invalid_bearer_auth_param } |
Error codes for failures of extraction of bearer authentification parameters. More... | |
Functions | |
RESTINIO_NODISCARD string_view_t | to_string_view (extraction_error_t what) noexcept |
Helper function to get a string name of extraction_error enum. More... | |
RESTINIO_NODISCARD expected_t< params_t, extraction_error_t > | try_extract_params (const authorization_value_t &http_field) |
Helper function for getting parameters of bearer authentification from an already parsed HTTP-field. More... | |
RESTINIO_NODISCARD expected_t< params_t, extraction_error_t > | try_extract_params (authorization_value_t &&http_field) |
Helper function for getting parameters of bearer authentification from an already parsed HTTP-field. More... | |
RESTINIO_NODISCARD expected_t< params_t, extraction_error_t > | try_extract_params (const http_header_fields_t &fields, string_view_t auth_field_name) |
Helper function for getting parameters of bearer authentification from a set of HTTP-fields. More... | |
template<typename Extra_Data > | |
RESTINIO_NODISCARD expected_t< params_t, extraction_error_t > | try_extract_params (const generic_request_t< Extra_Data > &req, string_view_t auth_field_name) |
Helper function for getting parameters of bearer authentification from a request. More... | |
RESTINIO_NODISCARD expected_t< params_t, extraction_error_t > | try_extract_params (const http_header_fields_t &fields, http_field_t auth_field_id) |
Helper function for getting parameters of bearer authentification from a set of HTTP-fields. More... | |
template<typename Extra_Data > | |
RESTINIO_NODISCARD expected_t< params_t, extraction_error_t > | try_extract_params (const generic_request_t< Extra_Data > &req, http_field_t auth_field_id) |
Helper function for getting parameters of bearer authentification from a request. More... | |
|
strong |
Error codes for failures of extraction of bearer authentification parameters.
Definition at line 57 of file bearer_auth.hpp.
|
inlinenoexcept |
Helper function to get a string name of extraction_error enum.
Definition at line 81 of file bearer_auth.hpp.
|
inline |
Helper function for getting parameters of bearer authentification from an already parsed HTTP-field.
Usage example (please note that const
is not used in code when authorization HTTP-field is parsed):
Definition at line 214 of file bearer_auth.hpp.
|
inline |
Helper function for getting parameters of bearer authentification from an already parsed HTTP-field.
Usage example:
Definition at line 152 of file bearer_auth.hpp.
|
inline |
Helper function for getting parameters of bearer authentification from a request.
Usage example:
req | A request that should hold a HTTP-field with authentification parameters. |
auth_field_id | The ID of a HTTP-field with authentification parameters. |
Definition at line 373 of file bearer_auth.hpp.
|
inline |
Helper function for getting parameters of bearer authentification from a request.
This helper function is intended to be used for cases when authentification parameters are stored inside a HTTP-field with a custom name. For example:
req | A request that should hold a HTTP-field with authentification parameters. |
auth_field_name | The name of a HTTP-field with authentification parameters. |
Definition at line 308 of file bearer_auth.hpp.
|
inline |
Helper function for getting parameters of bearer authentification from a set of HTTP-fields.
Usage example:
fields | A set of HTTP-fields. |
auth_field_id | The ID of a HTTP-field with authentification parameters. |
Definition at line 340 of file bearer_auth.hpp.
|
inline |
Helper function for getting parameters of bearer authentification from a set of HTTP-fields.
This helper function is intended to be used for cases when authentification parameters are stored inside a HTTP-field with a custom name. For example:
fields | A set of HTTP-fields. |
auth_field_name | The name of a HTTP-field with authentification parameters. |
Definition at line 275 of file bearer_auth.hpp.