restReqBasicAuthGet (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will read the basic authentication of a request.

To tell the client that it must send basic authentication, use restRespBasicAuthSet and status code 401.

 

Input:

req : SYSHANDLE

A handle to the request.

 

Output:

user : STRING

The user name. Empty if no user name was provided.

 

pass : STRING

The password. Empty if no password was provided.

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid request

 

Declaration:

FUNCTION restReqBasicAuthGet : INT;
VAR_INPUT
  req            : SYSHANDLE;
  user           : ACCESS STRING;
  pass           : ACCESS STRING;
END_VAR;

 

 

Example:

Please see the "Examples - REST Basic Authentication Example"