GetSupportScheme

Description

Gets the authorization scheme that is supported by the server.

When the HTTP status code is 407 (the proxy requires authentication) or 401 (the server requires authentication), this function can be used to parse the authentication headers to determine the supported authentication schemes.

Applies to

HTTPClient object

Syntax

objectname.GetSupportScheme(ref integer scheme[])

Argument

Description

objectname

The name of the object from which you want to get the supported authentication scheme.

scheme

The authentication scheme that is currently supported. The function returns an array of the authentication scheme from the available schemes, based on the authentication scheme preferences suggested by the server. The first scheme in the array list has the highest security level, the second one has a lower security level, and so on.

0 -- Automatic authentication (Automatically use one of the following five authentication schemes)

1 -- Negotiate authentication

2 -- NTLM authentication

3 -- Passport authentication (Unvalidated, because Microsoft has terminated this service.)

4 -- Digest authentication

5 -- Basic authentication


Return value

Integer.

Returns 1 for success and -1 for failure.

Examples

The following example gets the authorization scheme that is currently supported.

Integer  li_Scheme[]
HTTPClient lhc_Client
lhc_Client = Create HTTPClient
//get the supported scheme
lhc_Client.GetSupportScheme(ref li_Scheme)

See also

SetCredentials

ResendPostRequest