IntelligentPlant.IndustrialAppStore.CommandLine
3.5.0-pre.414
See the version list below for details.
dotnet add package IntelligentPlant.IndustrialAppStore.CommandLine --version 3.5.0-pre.414
NuGet\Install-Package IntelligentPlant.IndustrialAppStore.CommandLine -Version 3.5.0-pre.414
<PackageReference Include="IntelligentPlant.IndustrialAppStore.CommandLine" Version="3.5.0-pre.414" />
<PackageVersion Include="IntelligentPlant.IndustrialAppStore.CommandLine" Version="3.5.0-pre.414" />
<PackageReference Include="IntelligentPlant.IndustrialAppStore.CommandLine" />
paket add IntelligentPlant.IndustrialAppStore.CommandLine --version 3.5.0-pre.414
#r "nuget: IntelligentPlant.IndustrialAppStore.CommandLine, 3.5.0-pre.414"
#:package IntelligentPlant.IndustrialAppStore.CommandLine@3.5.0-pre.414
#addin nuget:?package=IntelligentPlant.IndustrialAppStore.CommandLine&version=3.5.0-pre.414&prerelease
#tool nuget:?package=IntelligentPlant.IndustrialAppStore.CommandLine&version=3.5.0-pre.414&prerelease
IntelligentPlant.IndustrialAppStore.CommandLine
This package contains types for authenticating with and calling the Intelligent Plant Industrial App Store API from command-line applications.
Please consider using the IntelligentPlant.IndustrialAppStore.Templates package to simplify creation of projects that are pre-configured to use this package.
Getting Started
First, visit the Industrial App Store and create a registration for your app. When you register your app, you can configure the default scopes (i.e. permissions) that the app will request (user info, reading user data sources, etc). You must also enable the Device Code Authorization Flow for your app.
Next, register CLI services with the dependency injection container:
services.AddIndustrialAppStoreCliServices(options => {
options.ClientId = "<YOUR CLIENT ID>";
// Base folder for application data such as encrypted authentication
// tokens. Relative paths are resolved using the user's local
// application data folder.
options.AppDataPath = "MyIasApp";
});
Next, build the service provider and ensure that a valid Industrial App Store authentication session is available:
var provider = services.BuildServiceProvider();
using var scope = provider.CreateScope();
var sessionManager = scope.ServiceProvider.GetRequiredService<IndustrialAppStoreSessionManager>();
await sessionManager.SignInAsync((request, ct) => {
Console.WriteLine($"Please sign in by visiting {request.VerificationUri} and entering the following code: {request.UserCode}");
return default;
});
Finally, use the IndustrialAppStoreHttpClient
service to interact with the Industrial App Store APIs:
var client = scope.ServiceProvider.GetRequiredService<IndustrialAppStoreHttpClient>();
var dataSources = await client.DataSources.GetDataSourcesAsync();
Persisting Application Data
If your application persists data to disk, you can use the AppDataFolderProvider
service to get the base path for your app's data folder:
var appDataDir = scope.ServiceProvider.GetRequiredService<AppDataFolderProvider>().AppDataFolder;
var myDataDir = appDataDir.CreateSubdirectory("MyData");
Encrypted authentication tokens are saved to a sub-folder of the base folder provided by AppDataFolderProvider
.
Specifying an Application Discriminator for Encryption
The IndustrialAppStoreSessionManager
type uses ASP.NET Core Data Protection to encrypt authentication tokens at rest. When using Microsoft.Extensions.Hosting, the application discriminator for the data protection system (used to isolate protected data even when apps share the same keys) is derived from the content root path for the host by default.
The content root path defaults to the directory containing the application assembly. This means that if you run multiple instances of your app from different directories, they will not be able to decrypt each other's tokens. If you want to share tokens between different instances of your app regardless of the content root path, you can configure the application name to use with the data protection system:
builder.Services
.AddDataProtection()
.SetApplicationName("MyIasApp");
If you are not using Microsoft.Extensions.Hosting and are instead manually creating an IServiceCollection
, no application discriminator is set by default. You should set an application name for your app as shown above to ensure that the data protection system isolates protected data specific to your application.
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 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- IntelligentPlant.IndustrialAppStore.DependencyInjection (>= 3.5.0-pre.414)
- IntelligentPlant.IndustrialAppStore.HttpClient (>= 3.5.0-pre.414)
- Microsoft.AspNetCore.DataProtection (>= 8.0.15)
- Microsoft.Bcl.TimeProvider (>= 8.0.1)
- Nito.AsyncEx.Coordination (>= 5.1.2)
-
net8.0
- IntelligentPlant.IndustrialAppStore.DependencyInjection (>= 3.5.0-pre.414)
- IntelligentPlant.IndustrialAppStore.HttpClient (>= 3.5.0-pre.414)
- Microsoft.AspNetCore.DataProtection (>= 8.0.15)
- Microsoft.Bcl.TimeProvider (>= 8.0.1)
- Nito.AsyncEx.Coordination (>= 5.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
3.5.0-pre.417 | 117 | 7/2/2025 |
3.5.0-pre.414 | 127 | 5/20/2025 |
3.5.0-pre.409 | 84 | 5/9/2025 |
3.4.1 | 168 | 4/8/2025 |
3.4.0 | 163 | 4/8/2025 |
3.3.0 | 108 | 2/28/2025 |
3.3.0-pre.382 | 71 | 2/26/2025 |
3.2.0 | 114 | 2/3/2025 |
3.1.0 | 146 | 12/12/2024 |
3.0.0 | 114 | 11/27/2024 |
3.0.0-pre.361 | 66 | 11/20/2024 |
3.0.0-pre.358 | 62 | 11/20/2024 |
3.0.0-pre.351 | 61 | 11/15/2024 |
3.0.0-pre.348 | 78 | 11/11/2024 |
3.0.0-pre.339 | 70 | 11/7/2024 |