Lean  $LEAN_TAG$
QuantConnect.Api.Authentication Class Reference

Helper methods for api authentication and interaction More...

Static Public Member Functions

static string Hash (int timestamp)
 Generate a secure hash for the authorization headers. More...
 
static string Hash (int timestamp, string token)
 Generate a secure hash for the authorization headers. More...
 
static string Link (string endpoint, IEnumerable< KeyValuePair< string, object >> payload=null)
 Create an authenticated link for the target endpoint using the optional given payload More...
 
static void PopulateQueryString (NameValueCollection queryString, IEnumerable< KeyValuePair< string, object >> payload=null)
 Helper method to populate a query string with the given payload More...
 

Detailed Description

Helper methods for api authentication and interaction

Definition at line 30 of file Authentication.cs.

Member Function Documentation

◆ Hash() [1/2]

static string QuantConnect.Api.Authentication.Hash ( int  timestamp)
static

Generate a secure hash for the authorization headers.

Returns
Time based hash of user token and timestamp.

Definition at line 36 of file Authentication.cs.

◆ Hash() [2/2]

static string QuantConnect.Api.Authentication.Hash ( int  timestamp,
string  token 
)
static

Generate a secure hash for the authorization headers.

Returns
Time based hash of user token and timestamp.

Definition at line 45 of file Authentication.cs.

◆ Link()

static string QuantConnect.Api.Authentication.Link ( string  endpoint,
IEnumerable< KeyValuePair< string, object >>  payload = null 
)
static

Create an authenticated link for the target endpoint using the optional given payload

Parameters
endpointThe endpoint
payloadThe payload
Returns
The authenticated link to trigger the request

Definition at line 59 of file Authentication.cs.

Here is the call graph for this function:

◆ PopulateQueryString()

static void QuantConnect.Api.Authentication.PopulateQueryString ( NameValueCollection  queryString,
IEnumerable< KeyValuePair< string, object >>  payload = null 
)
static

Helper method to populate a query string with the given payload

Useful for testing purposes

Definition at line 76 of file Authentication.cs.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: