Mannheim.Salesforce
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Mannheim.Salesforce --version 1.0.0
NuGet\Install-Package Mannheim.Salesforce -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mannheim.Salesforce" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mannheim.Salesforce --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Mannheim.Salesforce, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mannheim.Salesforce as a Cake Addin #addin nuget:?package=Mannheim.Salesforce&version=1.0.0 // Install Mannheim.Salesforce as a Cake Tool #tool nuget:?package=Mannheim.Salesforce&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Mannheim.Salesforce
Utilities for accessing Salesforce in non-interactive scenarios.
A part of the Mannheim libraries.
RexisClientProvider
Creates clients using refresh tokens in an in-built token store. This allows accessing Salesforce either non-interactively or with a technical account.
- Configure service
services.Configure<SalesforceConfigDataProtectedFileStoreOptions>(o =>
{
o.Folder = new DirectoryInfo("<<folder path>>");
o.ProtectorKey = "Key";
});
services.AddDataProtection();
services.AddSingleton<ISalesforceConfigStore, SalesforceConfigDataProtectedFileStore>();
services.AddSingleton<SalesforceClientProvider>();
- Provide OAuth configuration
ISalesforceConfigStore store = <<from dependency injection>>;
var config = new SalesforceOAuthConfiguration {
ConsumerId = "<<from Salesforce>>"
, ConsumerSecret = "<<from Salesforce>>"
, RedirectUrl = "<<from Salesforce>>"
};
await store.SaveSalesforceOAuthConfigurationAsync(config);
This needs to be done just once. Later on the config will be stored permanently in the store.
- Get OAuth web flow url
SalesforceClientProvider clientProvider = <<from dependency injection>>;
var salesforceLoginUrl = await clientProvider.GetWebFlowUriAsync(new Uri("https://address.my.salesforce.com"));
Alternatively use Device Flow.
- Complete web flow and client
SalesforceClientProvider clientProvider = <<from dependency injection>>;
string code = "<<from redirect>>";
await clientProvider.AddClientForTokenAsync(new Uri("https://address.my.salesforce.com"), code);
- Use client where needed
SalesforceClientProvider clientProvider = <<from dependency injection>>;
SalesforceClient client = await clientProvider.GetClientAsync();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.2 is compatible. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 2.2
- Mannheim.DataProtection (>= 1.0.0)
- Microsoft.Extensions.DependencyInjection (>= 2.2.0)
- Microsoft.Extensions.Http (>= 2.2.0)
- Microsoft.Extensions.Logging.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Options (>= 2.2.0)
- Newtonsoft.Json (>= 12.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.