Skip to content

struct flake::AuthenticationSink

#include <Connection.h>

Public Functions

Name
virtual voidonAuthChallengeReceived(char * challenge_type, byte * challenge, int challenge_len, byte ** response, int * response_len) =0
called if we need to authenticate (Client and Router)
virtual intonAuthChallengeRequested(void * wire, char ** callenge_type, byte ** challenge, int * challenge_len) =0
virtual intonAuthResponseReceived(char * challenge_type, byte * challenge, int challenge_len, byte * response, int response_len) =0
virtual intonConnect(const PropArray & props) =0
called if authentication type is 'atInteractive'. Return 0 if auth is accepted (Router only)
virtual flakeAuthTypeauthenticationType() =0
return the desired authentication type

Protected Functions

Name
~AuthenticationSink() =default

Public Functions Documentation

function onAuthChallengeReceived

cpp
virtual void onAuthChallengeReceived(
    char * challenge_type,
    byte * challenge,
    int challenge_len,
    byte ** response,
    int * response_len
) =0

called if we need to authenticate (Client and Router)

function onAuthChallengeRequested

cpp
virtual int onAuthChallengeRequested(
    void * wire,
    char ** callenge_type,
    byte ** challenge,
    int * challenge_len
) =0

called on a new connection on a wire (Router only) return 0 if challenge is present, -1 if no auth wanted/needed

function onAuthResponseReceived

cpp
virtual int onAuthResponseReceived(
    char * challenge_type,
    byte * challenge,
    int challenge_len,
    byte * response,
    int response_len
) =0

called if we asked for challenge auth on a wire. Returns 0 if auth is ok (Router only) the previously allocated challenge_type and challenge should be freed here.

function onConnect

cpp
virtual int onConnect(
    const PropArray & props
) =0

called if authentication type is 'atInteractive'. Return 0 if auth is accepted (Router only)

function authenticationType

cpp
virtual flakeAuthType authenticationType() =0

return the desired authentication type

Protected Functions Documentation

function ~AuthenticationSink

cpp
~AuthenticationSink() =default