AN_SET_AUTHSCHEME(3)

NAME

an_set_authscheme - allow an authentication scheme to be used on a socket

SYNOPSIS

#include <antinat.h>

int an_set_authscheme(ANCONN s, int scheme);

DESCRIPTION

The an_set_authscheme(3) function is used to allow an authentication scheme to be used on a proxy capable socket. By default, all supported authentication schemes are allowed. After this function is called however, only schemes that have been explicitly allowed under this function will be acceptable. Currently defined authentication schemes are: AN_AUTH_ANON, AN_AUTH_CLEARTEXT, AN_AUTH_BASIC and AN_AUTH_CHAP. Cleartext and basic can be considered as equivalent, referring to different names for different proxy types, but can be used interchangably. In order to reset the authentication schemes chosen, use the an_clear_authschemes(3) function.

s is a socket previously created with an_new_connection(3).

scheme is an authentication scheme, any one of AN_AUTH_ANON, AN_AUTH_CLEARTEXT, AN_AUTH_BASIC or AN_AUTH_CHAP.

RETURN VALUE

This call returns AN_ERROR_SUCCESS to indicate successful completion.

ERRORS

AN_ERROR_INVALIDARG
    The socket handle is invalid, or the authentication scheme is not recognised.

SEE ALSO

an_clear_authschemes(3), an_new_connection(3), an_set_credentials(3)

AUTHOR

Malcolm Smith <malxau@users.sourceforge.net>