AuthScheme Property
The authentication scheme to use when server authorization is required.
Syntax
json.getAuthScheme([callback]) json.setAuthScheme( authScheme, [callback])
Possible Values
0 (authBasic), 1 (authDigest), 2 (authProprietary), 3 (authNone), 4 (authNtlm), 5 (authNegotiate), 6 (authOAuth)
Default Value
0
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getAuthScheme([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setAuthScheme([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This property will tell the class which type of authorization to perform when the User and Password properties are set.
This property should be set to authNone (3) when no authentication is to be performed.
By default, this property is authBasic (0), and if the User and Password properties are set, the class will attempt basic authentication. If AuthScheme is set to authDigest (1), authNtlm (4) or authNegotiate (5), digest, NTLM or Negotiate authentication will be attempted instead.
If AuthScheme is set to authProprietary (2) then the authorization token must be supplied through Authorization property.
If AuthScheme is set to authOAuth (6) then the authorization string must be supplied through Authorization property.
Note that, if you set the Authorization property and AuthScheme is not authProprietary or authOAuth, the AuthScheme will be set automatically to authProprietary (2) by the control.
For security purposes, changing the value of this property will cause the class to clear the values of User, Password and Authorization.
Data Type
Integer