MySQL 8.4.2
Source Code Documentation
client_authentication::assertion Class Referenceabstract

Class to initiate authentication(aka assertion in FIDO terminology) on client side by generating a signed signature by FIDO device which needs to be sent to server to be verified. More...

#include <assertion.h>

Inheritance diagram for client_authentication::assertion:
[legend]

Public Member Functions

 assertion ()
 Construcutor to allocate memory for performing assertion (authentication) More...
 
virtual ~assertion ()
 Standard destructor. More...
 
void set_cred_id (const unsigned char *cred, size_t len)
 Set method to set credential ID. More...
 
void set_rp_id (const char *rp_id)
 Method to set the relying party name or id. More...
 
const char * get_rp_id ()
 Method to get rp id. More...
 
const unsigned char * get_authdata_ptr (size_t index=0)
 Method to get authenticator data. More...
 
size_t get_authdata_len (size_t index=0)
 Method to get length of authenticator data. More...
 
const unsigned char * get_signature_ptr (size_t index=0)
 Method to get signature. More...
 
size_t get_signature_len (size_t index=0)
 Method to get length of signature. More...
 
size_t get_num_assertions ()
 Method to get number of assertions. More...
 
virtual bool get_signed_challenge (unsigned char **challenge_res, size_t &challenge_res_len)=0
 
virtual void set_client_data (const unsigned char *, const char *)=0
 
virtual bool sign_challenge ()=0
 
virtual bool parse_challenge (const unsigned char *challenge)=0
 

Protected Member Functions

fido_dev_info_t * discover_fido2_devices (size_t num_devices)
 Discover available devices. More...
 

Protected Attributes

fido_assert_t * m_assert
 

Detailed Description

Class to initiate authentication(aka assertion in FIDO terminology) on client side by generating a signed signature by FIDO device which needs to be sent to server to be verified.

Constructor & Destructor Documentation

◆ assertion()

assertion::assertion ( )

Construcutor to allocate memory for performing assertion (authentication)

◆ ~assertion()

assertion::~assertion ( )
virtual

Standard destructor.

Member Function Documentation

◆ discover_fido2_devices()

fido_dev_info_t * assertion::discover_fido2_devices ( size_t  num_devices)
protected

Discover available devices.

Caller should always free num_devices + 1.

Parameters
[in]num_devicesNumber of devices to open
Returns
handle to fido_dev_info_t array on success. null otherwise.

◆ get_authdata_len()

size_t assertion::get_authdata_len ( size_t  index = 0)

Method to get length of authenticator data.

Parameters
[in]indexAssertion index
Return values
lengthof authenticator data

◆ get_authdata_ptr()

const unsigned char * assertion::get_authdata_ptr ( size_t  index = 0)

Method to get authenticator data.

Parameters
[in]indexAssertion index
Return values
bufferholding authenticator data

◆ get_num_assertions()

size_t assertion::get_num_assertions ( )

Method to get number of assertions.

Return values
Numberof assertions

◆ get_rp_id()

const char * assertion::get_rp_id ( )

Method to get rp id.

Return values
bufferholding rp id

◆ get_signature_len()

size_t assertion::get_signature_len ( size_t  index = 0)

Method to get length of signature.

Parameters
[in]indexAssertion index
Return values
lengthof signature

◆ get_signature_ptr()

const unsigned char * assertion::get_signature_ptr ( size_t  index = 0)

Method to get signature.

Parameters
[in]indexAssertion index
Return values
bufferholding signature data

◆ get_signed_challenge()

virtual bool client_authentication::assertion::get_signed_challenge ( unsigned char **  challenge_res,
size_t &  challenge_res_len 
)
pure virtual

Implemented in webauthn_assertion.

◆ parse_challenge()

virtual bool client_authentication::assertion::parse_challenge ( const unsigned char *  challenge)
pure virtual

Implemented in webauthn_assertion.

◆ set_client_data()

virtual void client_authentication::assertion::set_client_data ( const unsigned char *  ,
const char *   
)
pure virtual

Implemented in webauthn_assertion.

◆ set_cred_id()

void assertion::set_cred_id ( const unsigned char *  cred,
size_t  len 
)

Set method to set credential ID.

Parameters
[in]credbuffer holding credential ID
[in]lenlength of credential ID

◆ set_rp_id()

void assertion::set_rp_id ( const char *  rp_id)

Method to set the relying party name or id.

Parameters
[in]rp_idbuffer holding relying party name

◆ sign_challenge()

virtual bool client_authentication::assertion::sign_challenge ( )
pure virtual

Implemented in webauthn_assertion.

Member Data Documentation

◆ m_assert

fido_assert_t* client_authentication::assertion::m_assert
protected

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