1+ using System ;
2+ using System . Threading . Tasks ;
3+
4+ namespace ForceDotNetJwtCompanion ;
5+
6+ /// <summary>
7+ /// IJwtAuthenticationClient
8+ ///
9+ /// HTTP handling and orchestration of JWT OAuth Flow with Salesforce.
10+ ///
11+ /// </summary>
12+ public interface IJwtAuthenticationClient : IDisposable
13+ {
14+ string InstanceUrl { get ; set ; }
15+ string AccessToken { get ; set ; }
16+ string Id { get ; set ; }
17+ string ApiVersion { get ; set ; }
18+
19+ /// <summary>
20+ /// JwtUnencryptedPrivateKeyAsync
21+ ///
22+ /// Obtain access token with unencrypted private key (not recommended)
23+ /// Token Endpoint: https://login.salesforce.com/services/oauth2/token (production)
24+ /// </summary>
25+ /// <param name="clientId">ClientId of the Connected App aka Consumer Key</param>
26+ /// <param name="key">Private key as string, it is not required to remove header and footer</param>
27+ /// <param name="username">Salesforce username</param>
28+ Task JwtUnencryptedPrivateKeyAsync ( string clientId , string key , string username ) ;
29+
30+ /// <summary>
31+ /// JwtPrivateKeyAsync
32+ ///
33+ /// Obtain access token with encrypted private key
34+ /// Token Endpoint: https://login.salesforce.com/services/oauth2/token (production)
35+ /// </summary>
36+ /// <param name="clientId">ClientId of the Connected App aka Consumer Key</param>
37+ /// <param name="key">Private key as string, it is not required to remove header and footer</param>
38+ /// <param name="passphrase">Passphrase of the private key</param>
39+ /// <param name="username">Salesforce username</param>
40+ Task JwtPrivateKeyAsync ( string clientId , string key , string passphrase , string username ) ;
41+
42+ /// <summary>
43+ /// JwtUnencryptedPrivateKeyAsync
44+ ///
45+ /// Obtain access token with unencrypted private key (not recommended)
46+ /// with token endpoint
47+ /// </summary>
48+ /// <param name="clientId">ClientId of the Connected App aka Consumer Key</param>
49+ /// <param name="key">Private key as string, it is not required to remove header and footer</param>
50+ /// <param name="username">Salesforce username</param>
51+ /// <param name="tokenEndpoint">TokenEndpointUrl e.g. https://test.salesforce.com/services/oauth2/token</param>
52+ Task JwtUnencryptedPrivateKeyAsync ( string clientId , string key , string username , string tokenEndpoint ) ;
53+
54+ /// <summary>
55+ /// JwtPrivateKeyAsync
56+ ///
57+ /// Obtain access token with encrypted private key
58+ /// with token endpoint
59+ /// </summary>
60+ /// <param name="clientId">ClientId of the Connected App aka Consumer Key</param>
61+ /// <param name="key">Private key as string, it is not required to remove header and footer</param>
62+ /// <param name="passphrase">Passphrase of the private key</param>
63+ /// <param name="username">Salesforce username</param>
64+ /// <param name="tokenEndpoint">TokenEndpointUrl e.g. https://test.salesforce.com/services/oauth2/token</param>
65+ Task JwtPrivateKeyAsync ( string clientId , string key , string passphrase , string username , string tokenEndpoint ) ;
66+ }
0 commit comments