OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::ChallengeResponse Class Reference

#include <cr.hpp>

Inheritance diagram for openvpn::ChallengeResponse:
[legend]
Collaboration diagram for openvpn::ChallengeResponse:
[legend]

Public Types

typedef RCPtr< ChallengeResponsePtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 OPENVPN_SIMPLE_EXCEPTION (dynamic_challenge_parse_error)
 
 OPENVPN_SIMPLE_EXCEPTION (static_challenge_parse_error)
 
 ChallengeResponse ()
 
 ChallengeResponse (const std::string &cookie)
 
 ChallengeResponse (const std::string &cookie, const std::string &user)
 
void init (const std::string &cookie)
 
std::string construct_dynamic_password (const std::string &response) const
 
const std::string & get_state_id () const
 
const std::string & get_username () const
 
bool get_echo () const
 
bool get_response_required () const
 
const std::string & get_challenge_text () const
 
- Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
 RC () noexcept=default
 
 RC (const RC &)=delete
 
virtual ~RC ()=default
 
RCoperator= (const RC &)=delete
 
olong use_count () const noexcept
 Delegates call to RCImpl and returns the result.
 

Static Public Member Functions

static bool is_dynamic (const std::string &s)
 
static bool is_static (const std::string &s)
 
static void validate_dynamic (const std::string &cookie)
 
static std::string construct_static_password (const std::string &password, const std::string &response)
 
static void parse_static_cookie (const std::string &cookie, std::string &password, std::string &response)
 
static std::string generate_dynamic_challenge (const std::string &session_token, const std::string &username, const std::string &challenge, const bool echo, const bool response_required)
 
- Static Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 

Private Attributes

bool echo
 
bool response_required
 
std::string state_id
 
std::string username
 
std::string challenge_text
 

Detailed Description

Definition at line 41 of file cr.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 44 of file cr.hpp.

Constructor & Destructor Documentation

◆ ChallengeResponse() [1/3]

openvpn::ChallengeResponse::ChallengeResponse ( )
inline

Definition at line 49 of file cr.hpp.

◆ ChallengeResponse() [2/3]

openvpn::ChallengeResponse::ChallengeResponse ( const std::string &  cookie)
inlineexplicit

Definition at line 54 of file cr.hpp.

◆ ChallengeResponse() [3/3]

openvpn::ChallengeResponse::ChallengeResponse ( const std::string &  cookie,
const std::string &  user 
)
inline

Definition at line 60 of file cr.hpp.

Member Function Documentation

◆ construct_dynamic_password()

std::string openvpn::ChallengeResponse::construct_dynamic_password ( const std::string &  response) const
inline

Definition at line 129 of file cr.hpp.

Here is the caller graph for this function:

◆ construct_static_password()

static std::string openvpn::ChallengeResponse::construct_static_password ( const std::string &  password,
const std::string &  response 
)
inlinestatic

Definition at line 136 of file cr.hpp.

Here is the caller graph for this function:

◆ generate_dynamic_challenge()

static std::string openvpn::ChallengeResponse::generate_dynamic_challenge ( const std::string &  session_token,
const std::string &  username,
const std::string &  challenge,
const bool  echo,
const bool  response_required 
)
inlinestatic

Definition at line 178 of file cr.hpp.

◆ get_challenge_text()

const std::string & openvpn::ChallengeResponse::get_challenge_text ( ) const
inline

Definition at line 223 of file cr.hpp.

Here is the caller graph for this function:

◆ get_echo()

bool openvpn::ChallengeResponse::get_echo ( ) const
inline

Definition at line 215 of file cr.hpp.

Here is the caller graph for this function:

◆ get_response_required()

bool openvpn::ChallengeResponse::get_response_required ( ) const
inline

Definition at line 219 of file cr.hpp.

Here is the caller graph for this function:

◆ get_state_id()

const std::string & openvpn::ChallengeResponse::get_state_id ( ) const
inline

Definition at line 207 of file cr.hpp.

Here is the caller graph for this function:

◆ get_username()

const std::string & openvpn::ChallengeResponse::get_username ( ) const
inline

Definition at line 211 of file cr.hpp.

Here is the caller graph for this function:

◆ init()

void openvpn::ChallengeResponse::init ( const std::string &  cookie)
inline

Definition at line 72 of file cr.hpp.

Here is the caller graph for this function:

◆ is_dynamic()

static bool openvpn::ChallengeResponse::is_dynamic ( const std::string &  s)
inlinestatic

Definition at line 114 of file cr.hpp.

Here is the caller graph for this function:

◆ is_static()

static bool openvpn::ChallengeResponse::is_static ( const std::string &  s)
inlinestatic

Definition at line 119 of file cr.hpp.

◆ OPENVPN_SIMPLE_EXCEPTION() [1/2]

openvpn::ChallengeResponse::OPENVPN_SIMPLE_EXCEPTION ( dynamic_challenge_parse_error  )

◆ OPENVPN_SIMPLE_EXCEPTION() [2/2]

openvpn::ChallengeResponse::OPENVPN_SIMPLE_EXCEPTION ( static_challenge_parse_error  )

◆ parse_static_cookie()

static void openvpn::ChallengeResponse::parse_static_cookie ( const std::string &  cookie,
std::string &  password,
std::string &  response 
)
inlinestatic

Definition at line 144 of file cr.hpp.

◆ validate_dynamic()

static void openvpn::ChallengeResponse::validate_dynamic ( const std::string &  cookie)
inlinestatic

Definition at line 124 of file cr.hpp.

Member Data Documentation

◆ challenge_text

std::string openvpn::ChallengeResponse::challenge_text
private

Definition at line 233 of file cr.hpp.

◆ echo

bool openvpn::ChallengeResponse::echo
private

Definition at line 229 of file cr.hpp.

◆ response_required

bool openvpn::ChallengeResponse::response_required
private

Definition at line 230 of file cr.hpp.

◆ state_id

std::string openvpn::ChallengeResponse::state_id
private

Definition at line 231 of file cr.hpp.

◆ username

std::string openvpn::ChallengeResponse::username
private

Definition at line 232 of file cr.hpp.


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