Hi Dave,
I am facing a similar error in my code but by the good of me can't find where hte missing paranthesis is.Any ideas?
class Credential
{
// accout region, use 'default' value unless being instructed otherwise
private const string d_region = "default";
// Once created each token will be valid only for the following specified period(in seconds).
// This value is ajustable on client side, but note that increasing this value too much
// might not suffice for security concerns, as well as too little value could lead to
// JWT token invalidation before it being received by the beap server due to network delays.
// You can adjust this value for your need or use default value unless you definitely know
// that you need to change this value.
private const int d_lifetime = 25;
/// <summary>
/// Provides access to client id parsed from credential.txt file.
/// </summary>
[JsonProperty("client_id")]
public string ClientId { get; set; }
/// <summary>
/// Accepts client secret form json deserializer and decodes it to bytes.
/// </summary>
[JsonProperty("client_secret")]
public string ClientSecret { set { DecodedSecret = FromHexString(value); } }
/// <summary>
/// Provides access to decoded client secret.
/// </summary>
public byte[] DecodedSecret { get; private set; }
/// <summary>
/// Converts hexadecimal string to bytes.
/// </summary>
/// <param name="s">Input hexadecimal string.</param>
/// <returns></returns>
static private byte[] FromHexString(string input)
{
return Enumerable.Range(0, input.Length)
.Where(charIdx => charIdx % 2 == 0)
.Select(charIdx => Convert.ToByte(input.Substring(charIdx, 2), 16))
.ToArray();
}
/// <summary>
/// Loads credentials from credential.txt file.
/// </summary>
/// <param name="d_credentialPath">Path to credential.txt file.</param>
/// <returns></returns>
------------------------------
Andrei Cozma
Data
Zurich
Europe/Madrid
------------------------------