Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
opt
cpr
include
cpr
auth.h
Go to the documentation of this file.
1
#ifndef CPR_AUTH_H
2
#define CPR_AUTH_H
3
4
#include <string>
5
6
#include "
cpr/defines.h
"
7
8
namespace
cpr
{
9
10
class
Authentication
{
11
public
:
12
template
<
typename
UserType,
typename
PassType>
13
Authentication
(UserType&& username, PassType&&
password
)
14
:
username_
{
CPR_FWD
(username)},
password_
{
CPR_FWD
(
password
)},
15
auth_string_
{
username_
+
":"
+
password_
} {}
16
17
const
char
*
GetAuthString
()
const
noexcept;
18
19
private
:
20
std::string
username_
;
21
std::string
password_
;
22
std::string
auth_string_
;
23
};
24
25
}
// namespace cpr
26
27
#endif
cpr::Authentication::username_
std::string username_
Definition:
auth.h:20
cpr::Authentication::password_
std::string password_
Definition:
auth.h:21
cpr::Authentication::Authentication
Authentication(UserType &&username, PassType &&password)
Definition:
auth.h:13
testing::internal::string
::std::string string
Definition:
gtest-port.h:1129
cpr::Authentication::GetAuthString
const char * GetAuthString() const noexcept
Definition:
auth.cpp:5
password
static char * password
Definition:
unit1304.c:27
CPR_FWD
#define CPR_FWD(...)
Definition:
defines.h:6
defines.h
cpr::Authentication::auth_string_
std::string auth_string_
Definition:
auth.h:22
cpr
Definition:
auth.cpp:3
cpr::Authentication
Definition:
auth.h:10
rc_tagdetect_client
Author(s): Monika Florek-Jasinska
, Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:08