Boost C++ Libraries

PrevUpHomeNext

Struct security_scheme

boost::taar::openapi::security_scheme — An entry of components.securitySchemes. Use the factories or fill the fields.

Synopsis

// In header: <boost/taar/openapi/generator.hpp>


struct security_scheme {

  // public static functions
  static security_scheme bearer(std::string = {}, std::string = {});
  static security_scheme basic(std::string = {});
  static security_scheme api_key_header(std::string, std::string = {});
  static security_scheme api_key_cookie(std::string, std::string = {});
  static security_scheme api_key_query(std::string, std::string = {});

  // public data members
  std::string type;  // "http", "apiKey", "oauth2", "openIdConnect" or "mutualTLS". 
  std::string description;
  std::string scheme;  // http: "bearer", "basic", ... 
  std::string bearer_format;  // http bearer: a hint such as "JWT". 
  std::string in;  // apiKey: "header", "query" or "cookie". 
  std::string name;  // apiKey: the header, query or cookie name. 
  std::string open_id_connect_url;  // openIdConnect. 
  boost::json::object flows;  // oauth2: the flows object, passed through. 
};

Description

security_scheme public static functions

  1. static security_scheme 
    bearer(std::string bearer_format = {}, std::string description = {});
  2. static security_scheme basic(std::string description = {});
  3. static security_scheme 
    api_key_header(std::string header_name, std::string description = {});
  4. static security_scheme 
    api_key_cookie(std::string cookie_name, std::string description = {});
  5. static security_scheme 
    api_key_query(std::string parameter_name, std::string description = {});

PrevUpHomeNext