Repository navigation
Expand file tree
/
Copy pathVerizonClientOptions.cs
More file actions
46 lines (44 loc) · 2.81 KB
/
Copy pathVerizonClientOptions.cs
File metadata and controls
46 lines (44 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using Verizon.Core.Authentication.OAuth2;
using Verizon.Core.Authentication.OAuth2.ClientCredentials;
using Verizon.Core.Configuration;
using Verizon.Core.Hooks;
using Verizon.Servers;
namespace Verizon;
public class VerizonClientOptions
{
public ServerEnvironment Environment { get; set; } = ServerEnvironment.Default();
public RetryOptions Retry { get; set; } = RetryOptions.Default();
public LoggingOptions Logging { get; set; } = new();
public TimeProvider TimeProvider { get; set; } = TimeProvider.System;
public ServerOptions Server { get; set; } = new();
/// <summary>
/// Maximum time to wait for the next frame of a streaming (SSE) response before the stream is
/// torn down with a timeout. Bounds only the wait for the server between frames, never the
/// caller's own processing time. Set to null to wait indefinitely.
/// </summary>
public TimeSpan? StreamReadTimeout { get; set; } = TimeSpan.FromSeconds(60);
public IReadOnlyList<SdkHook> Hooks { get; set; } = [];
/// <summary>
/// This is the ThingSpace token, from <see href="https://thingspace.verizon.com/documentation/api-documentation.html#/http/quick-start/credentials-and-tokens">Credentials and Tokens</see>
/// is used
/// </summary>
public OAuth2ClientCredentials? ThingspaceOauth { get; set; }
public IOAuth2TokenStrategy<OAuth2ClientCredentials>? ThingspaceOauthTokenStrategy { get; set; }
/// <summary>
/// M2M Session Token (<see href="$e/Session%20Management/StartConnectivityManagementSession">How to generate an M2M session token?</see>)
/// </summary>
public string? VzM2MToken { get; set; }
/// <summary>
/// This is the Session/M2M token needed to authenticate the user. It should be acquired by using the ThingSpace APIs. For detail on how to obtain a Session/M2M token please refer to the
/// - <see href="https://thingspace.verizon.com/documentation/api-documentation.html#/http/quick-start/credentials-and-tokens/obtaining-a-vz-m2m-sessiontoken-programmatically">ThingSpace Quick Start Guide - Obtaining a VZ-M2M Session Token Programmatically</see>
/// - or the <see href="https://www.youtube.com/watch?v=QPJQFT3637w">ThingSpace API Video Guide 1</see> and <see href="https://www.youtube.com/watch?v=hc9udGp4P_s">ThingSpace API Video Guide 2</see>
/// </summary>
public string? SessionToken { get; set; }
/// <summary>
/// This is where the ThingSpace access token, from <see href="https://thingspace.verizon.com/documentation/api-documentation.html#/http/quick-start/credentials-and-tokens">Credentials and Tokens</see> is used
/// </summary>
public OAuth2ClientCredentials? ThingspaceOauth1 { get; set; }
public IOAuth2TokenStrategy<OAuth2ClientCredentials>? ThingspaceOauth1TokenStrategy { get; set; }
}