Granada  1.54.0
Structured layer on top of C++ REST SDK for building server applications in C++. Granada implements sessions, server side plug-in framework, C++ OAuth 2.0 server, data storage access, server script running, server browsing.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Public Attributes | List of all members
granada::http::oauth2::OAuth2Parameters Class Reference

#include <oauth2.h>

Public Member Functions

 OAuth2Parameters ()
 
 OAuth2Parameters (const std::string &query_string)
 
std::unordered_map
< std::string, std::string > 
to_unordered_map ()
 
std::string to_query_string ()
 
web::json::value to_json ()
 

Public Attributes

std::string username
 
std::string password
 
std::string code
 
std::string authorize
 
std::string access_token
 
std::string expires_in
 
std::string refresh_token
 
std::string token_type
 
std::string grant_type
 
std::string response_type
 
std::string client_id
 
std::string client_secret
 
std::string redirect_uri
 
std::string scope
 
std::string state
 
std::string error
 
std::string error_description
 

Detailed Description

OAuth2 Parameters and parsing and encoding functions. Parameters for use with the authorization endpoint, the token endpoint and the information and deletion endpoint.

Constructor & Destructor Documentation

granada::http::oauth2::OAuth2Parameters::OAuth2Parameters ( )
inline

Constructor

granada::http::oauth2::OAuth2Parameters::OAuth2Parameters ( const std::string &  query_string)
inline

Constructor Parse a query string from an HTTP request and fill the oauth2 parameters.

Parameters
query_stringQuery string from HTTP request.

Member Function Documentation

web::json::value granada::http::oauth2::OAuth2Parameters::to_json ( )
inline

Convert OAuth 2.0 parameters into a json. Example: { "access_token":"2YotnFZFEjr1zCsicMWpAA", "token_type":"example", "expires_in":3600, "refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA", "example_parameter":"example_value" }

Returns
OAuth 2.0 parameters in form of json.
std::string granada::http::oauth2::OAuth2Parameters::to_query_string ( )
inline

Convert OAuth 2.0 parameters into a query string. Example: ?access_token=k5g25AGZcIfjduQ9vkLTzUXGbnBjbQ4RaJCfyOz02OiGlqhiIjYmR6tGbwJlQ0Gf&token_type=bearer&scope=MSG_INSERT%20MSG_SELECT%20&state=buPgXS4W1vVi7WUX

Returns
OAuth 2.0 parameters in form of query string.
std::unordered_map<std::string,std::string> granada::http::oauth2::OAuth2Parameters::to_unordered_map ( )
inline

Convert OAuth 2.0 parameters into a unordered_map.

Returns
OAuth 2.0 parameters in form of map.

Member Data Documentation

std::string granada::http::oauth2::OAuth2Parameters::access_token
std::string granada::http::oauth2::OAuth2Parameters::authorize
std::string granada::http::oauth2::OAuth2Parameters::client_id
std::string granada::http::oauth2::OAuth2Parameters::client_secret
std::string granada::http::oauth2::OAuth2Parameters::code
std::string granada::http::oauth2::OAuth2Parameters::error
std::string granada::http::oauth2::OAuth2Parameters::error_description
std::string granada::http::oauth2::OAuth2Parameters::expires_in
std::string granada::http::oauth2::OAuth2Parameters::grant_type
std::string granada::http::oauth2::OAuth2Parameters::password
std::string granada::http::oauth2::OAuth2Parameters::redirect_uri
std::string granada::http::oauth2::OAuth2Parameters::refresh_token
std::string granada::http::oauth2::OAuth2Parameters::response_type
std::string granada::http::oauth2::OAuth2Parameters::scope
std::string granada::http::oauth2::OAuth2Parameters::state
std::string granada::http::oauth2::OAuth2Parameters::token_type
std::string granada::http::oauth2::OAuth2Parameters::username

The documentation for this class was generated from the following file: