Webcom C SDK
Data Structures | Functions
Retrieve authentication tokens from the Webcom server

Data Structures

struct  wc_auth_info
 

Functions

int wc_auth_with_password (wc_context_t *ctx, const char *email, const char *password)
 

Detailed Description

Function Documentation

◆ wc_auth_with_password()

int wc_auth_with_password ( wc_context_t ctx,
const char *  email,
const char *  password 
)

Request an authentication token with email/password

Requests a token to the webcom server of the given context with the plain email/password method.

This function is asynchronous and returns immediately. Once the reply from the server is received, the main callback of the context will be called with the WC_AUTH_ON_AUTH_REPLY event, and a pointer to a struct wc_auth_info object as data.

Parameters
ctxthe webcom context
emailthe email
passwordthe password
Returns
1 on success, 0 on failure (e.g. out of memory)