Skip to content

Instantly share code, notes, and snippets.

@nest-don
Last active June 18, 2019 10:02
Show Gist options
  • Save nest-don/bc43de9420f925217ba14b5727543c66 to your computer and use it in GitHub Desktop.
Save nest-don/bc43de9420f925217ba14b5727543c66 to your computer and use it in GitHub Desktop.
string clientSignature = JsonConvert.SerializeObject((
Model: DeviceInfo.Model,
Manufacturer: DeviceInfo.Manufacturer,
Name: DeviceInfo.Name,
Platform: DeviceInfo.Platform,
Idiom: DeviceInfo.Idiom,
DeviceType: DeviceInfo.DeviceType,
HardwareVersion: DeviceInfo.VersionString,
SoftwareVersion: typeof(MainPage).GetTypeInfo()
.Assembly.GetName().Version.ToString(),
ApiVersion: ApiVersion
));
NesterService backend = new NesterService(
ApiVersion, clientSignature,
new StorageService(Path.Combine(
Path.GetTempPath(), "JWTAuthCache")
));
backend.Endpoint = DevelopmentEndpoint;
backend.AutoTokenRenew = true;
backend.RetryCount = 3;
backend.RetryBaseIntervalInSecs = 2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment