Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

SetCredentials – PB Docs 2022 – PowerBuilder Library

SetCredentials – PB Docs 2022

SetCredentials

PowerScript function

Description

Sets the authentication credentials. Assuming that an acceptable
authentication scheme and credentials are already known or obtained (for
example, via getsupportscheme), this function sends the authentication
credential to the server or proxy before sending requests to the
server.

Applies to

HTTPClient object in Objects and Controls

Syntax

Argument

Description

objectname

The name of the object from which you want to set the
authentication credentials.

isProxyAuth

Specifies whether the proxy or server requires
authentication. Values are:

True — The proxy requires authentication. The HTTP status
code is 407.

False — The server requires authentication. The HTTP
status code is 401.

scheme

The authentication scheme that is currently used. Values
are:

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

user

The user name for authentication.

password

The password for authentication.

Return value

Integer.

If any argument’s value is null, returns null. Otherwise returns the
following error code.

-19 — Security protocol error. It may be caused by TLS1.3 protocol,
or by the cipher suite during the TLS handshake.

-22 — The request needs to be resent. Only the ResendPostRequest
function can be called at this time.

-24 — Failed to set the authentication scheme.

Examples

The following example specifies that the server requires
authentication, uses the Negotiate authentication scheme and sets the user
name and password.

The following example creates an HTTPClient object, and uses
pre-authentication to set credentials in the initial request to the
server.

The following example gets the authorization scheme and then set
credentials accordingly.

See also

GetSupportScheme

ResendPostRequest


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x