2020-02-17 20:53:42 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
/// \file adapter/authenticate.h
|
|
|
|
/// \brief Authenticate function.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2019-03-26 22:04:53 +00:00
|
|
|
#ifndef WF_ADAPTER_AUTHENTICATE_H
|
|
|
|
#define WF_ADAPTER_AUTHENTICATE_H
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
#include <stdbool.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct wf_credentials;
|
|
|
|
|
2020-02-17 20:53:42 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
/// \brief Authentication function type.
|
|
|
|
///
|
|
|
|
/// Functions of this type are used to authenticate a user by some provided
|
|
|
|
/// credentials.
|
|
|
|
///
|
|
|
|
/// \param credentials credentials to authenticate the user
|
|
|
|
/// \param user_data context of the authentication function
|
|
|
|
/// \return true, if authentication was successful, false otherwise
|
|
|
|
///
|
|
|
|
/// \see wf_server_config_add_authenticator
|
|
|
|
/// \see wf_server_protocol_add_authenticator
|
|
|
|
//------------------------------------------------------------------------------
|
2019-03-26 22:04:53 +00:00
|
|
|
typedef bool wf_authenticate_fn(
|
|
|
|
struct wf_credentials * credentials,
|
|
|
|
void * user_data);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|