sptk2 logo
SPTK Home Page
Public Types | Public Member Functions | List of all members
sptk::HttpAuthentication Class Reference

#include <HttpAuthentication.h>

Public Types

enum class  Type : uint8_t {
  UNDEFINED , EMPTY , BASIC , BEARER ,
  DIGEST , HOBA , MUTUAL , AWS4_HMAC_SHA256
}
 

Public Member Functions

 HttpAuthentication (String authenticationHeader)
 
 HttpAuthentication (const HttpAuthentication &other)=default
 
String getHeader () const
 
const xdoc::SNode & getData ()
 
Type type ()
 

Detailed Description

HTTP authentication data, that is passed through Authentication header of HTTP request. Only Basic and Bearer authentication types are currently supported. The data is parsed upon first getData() call.

Member Enumeration Documentation

◆ Type

enum class sptk::HttpAuthentication::Type : uint8_t
strong

HTTP authentication type

Constructor & Destructor Documentation

◆ HttpAuthentication() [1/2]

sptk::HttpAuthentication::HttpAuthentication ( String  authenticationHeader)
explicit

Constructor

Parameters
authenticationHeaderAuthentication HTTP header content

◆ HttpAuthentication() [2/2]

sptk::HttpAuthentication::HttpAuthentication ( const HttpAuthentication other)
explicitdefault

Copy constructor

Parameters
authenticationHeaderAuthentication HTTP header content

Member Function Documentation

◆ getData()

const xdoc::SNode & sptk::HttpAuthentication::getData ( )

Get decoded authentication data (username and password, or JWT)

Returns
authentication data

◆ getHeader()

String sptk::HttpAuthentication::getHeader ( ) const

Get decoded authentication data (username and password, or JWT)

Returns
authentication data

◆ type()

Type sptk::HttpAuthentication::type ( )

Get authentication data type


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

Fri Oct 14 2022 09:58:42: SPTK 5.4.1