Kea 2.7.5
isc::http::BasicHttpAuth Class Reference

Represents a basic HTTP authentication. More...

#include <basic_auth.h>

Public Member Functions

 BasicHttpAuth (const std::string &secret)
 Constructor.
 
 BasicHttpAuth (const std::string &user, const std::string &password)
 Constructor.
 
const std::string & getCredential () const
 Returns the credential (base64 of the UTF-8 secret).
 
const std::string & getSecret () const
 Returns the secret.
 

Detailed Description

Represents a basic HTTP authentication.

It computes the credential from user and password.

Definition at line 21 of file basic_auth.h.

Constructor & Destructor Documentation

◆ BasicHttpAuth() [1/2]

isc::http::BasicHttpAuth::BasicHttpAuth ( const std::string & user,
const std::string & password )

Constructor.

Parameters
userUser id
passwordPassword
Exceptions
BadValueif user contains the ':' character.

Definition at line 19 of file basic_auth.cc.

References isc_throw.

◆ BasicHttpAuth() [2/2]

isc::http::BasicHttpAuth::BasicHttpAuth ( const std::string & secret)

Constructor.

Parameters
secretuser:password string
Exceptions
BadValueif secret does not contain the ':' character.

Definition at line 29 of file basic_auth.cc.

References isc_throw.

Member Function Documentation

◆ getCredential()

const std::string & isc::http::BasicHttpAuth::getCredential ( ) const
inline

Returns the credential (base64 of the UTF-8 secret).

Definition at line 43 of file basic_auth.h.

◆ getSecret()

const std::string & isc::http::BasicHttpAuth::getSecret ( ) const
inline

Returns the secret.

Definition at line 38 of file basic_auth.h.


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