ClientProfile Property
The type of client that is requesting authorization.
Syntax
oauth.getClientProfile([callback]) oauth.setClientProfile( clientProfile, [callback])
Possible Values
0 (cfApplication), 1 (cfWebServer), 2 (cfDevice), 3 (cfMobile), 4 (cfBrowser), 5 (cfJWT)
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 getClientProfile([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 setClientProfile([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 defines the type of client that will be requesting authorization. Set this before calling GetAuthorization to inform the class to act accordingly. Possible values are:
0 (cfApplication - default) | User application such as a windows form application |
1 (cfWebServer) | Server side application such as a website |
2 (cfDevice) | Device application without a browser such as a game console |
3 (cfMobile) | Mobile application with browser support such as a smart phone or tablet |
4 (cfBrowser) | Client side browser application such as javascript |
5 (cfJWT) | Server to Server authentication using a JWT Bearer Token |
Data Type
Integer