mcorest_set_basic_auth

Sets Basic HTTP authentication parameters for the server instance.

For an overview, see page Web Services

Prototype

    MCO_RET mcorest_set_basic_auth(mcorest_h rest,
                                const char *realm,
                                const char *username,
                                const char *password);

Arguments

rest
Server instance handle.
realm
The authentication realm (up to 15 characters).
username
The authentication username (up to 15 characters).
password
The authentication password (up to 31 characters).

Description

This function sets the Basic HTTP authentication parameters for the server instance. All arguments must be non-NULL, and the username and password strings cannot be empty. Repeated calls to this function will overwrite previously set parameters.

Return Codes

MCO_S_OK
Success.
MCO_E_REST_*
Any of the Web Services Error Codes.

Files

Header file:
mcorest.h
Source file:
mcorest.c
Library:
libmcorest.a