Qlik.OAuthManager 0.2.0

dotnet add package Qlik.OAuthManager --version 0.2.0                
NuGet\Install-Package Qlik.OAuthManager -Version 0.2.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="Qlik.OAuthManager" Version="0.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Qlik.OAuthManager --version 0.2.0                
#r "nuget: Qlik.OAuthManager, 0.2.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 Qlik.OAuthManager as a Cake Addin
#addin nuget:?package=Qlik.OAuthManager&version=0.2.0

// Install Qlik.OAuthManager as a Cake Tool
#tool nuget:?package=Qlik.OAuthManager&version=0.2.0                

qlik-oauth-manager

Library for using QCS OAuth clients to produce access tokens. Such tokens can in turn be used as API keys when configuring connections with the libraries QlikSense.NetSDK and QlikSenseRestClient. A flow to produce an access token could look like this:

var oauthManager = new OAuthManager(tenantUrl, clientId);
await oauthManager.AuthorizeInBrowser("user_default offline_access", redirectUri, Browser.Default);
var accessToken = await oauthManager.RequestNewAccessToken();

The resulting access token can then be used with the library QlikSense.NetSDK to connect to the engine like this:

var location = QcsLocation.FromUri(tenantUrl);
location.AsApiKey(accessToken);

using (var app = await location.AppAsync(appId))
{
    Console.WriteLine((await app.GetAppPropertiesAsync()).Title);
}

Or the token can be used to connect using the library QlikSenseRestClient like this:

var client = new RestClient(tenantUrl);
client.AsApiKeyViaQcs(accessToken);
Console.WriteLine(await client.GetAsync<JToken>("/api/v1/users/me"));
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.0 70 10/28/2024
0.1.0 114 9/25/2024
0.0.5 130 8/23/2024
0.0.4 118 8/19/2024
0.0.3 126 8/15/2024
0.0.2 80 8/2/2024
0.0.1 99 8/1/2024