C++ Rest SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Public Member Functions | Friends | List of all members
web::credentials Class Reference

Represents a set of user credentials (user name and password) to be used for authentication. More...

#include <web_utilities.h>

Public Member Functions

 credentials ()
 Constructs an empty set of credentials without a user name or password. More...
 
 credentials (utility::string_t username, const utility::string_t &password)
 Constructs credentials from given user name and password. More...
 
const utility::string_t & username () const
 The user name associated with the credentials. More...
 
utility::string_t password () const
 The password for the user name associated with the credentials. More...
 
bool is_set () const
 Checks if credentials have been set More...
 

Friends

class http::client::details::winhttp_client
 
class http::client::details::winrt_client
 
class websockets::client::details::winrt_callback_client
 
class websockets::client::details::wspp_callback_client
 

Detailed Description

Represents a set of user credentials (user name and password) to be used for authentication.

Constructor & Destructor Documentation

web::credentials::credentials ( )
inline

Constructs an empty set of credentials without a user name or password.

web::credentials::credentials ( utility::string_t  username,
const utility::string_t &  password 
)
inline

Constructs credentials from given user name and password.

Parameters
usernameUser name as a string.
passwordPassword as a string.

Member Function Documentation

bool web::credentials::is_set ( ) const
inline

Checks if credentials have been set

Returns
true if user name and password is set, false otherwise.
utility::string_t web::credentials::password ( ) const
inline

The password for the user name associated with the credentials.

Returns
A string containing the password.
const utility::string_t& web::credentials::username ( ) const
inline

The user name associated with the credentials.

Returns
A string containing the user name.

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