Skip to content

AccessManagementExtensions


title: “AccessManagementExtensions” description: “AccessManagementExtensions Class” lead: "" date: 2023-06-12T13:46:25-06:00 lastmod: 2023-06-12T13:46:25-06:00 draft: false images: [] menu: docs: parent: “dotnet-api” weight: 323 toc: true

Class Reference

Definition

Provides a class to register SDK implementations with an IServiceCollection.

  • Namespace: TrimbleCloud.Tam
  • Assembly: TrimbleCloud.Tam.dll
public static class AccessManagementExtensions

Initialization

This is a static class and provides extension methods for an IServiceCollection.

Methods

AddAccessManagement

Registers SDK classes with the IServiceCollection.

public static void AddAccessManagement(this IServiceCollection services, Environment environment, string consumerKey, string consumerSecret, string applianceUrl);

Parameters

services IServiceCollection The service collection into which interfaces and classes are injected.

environment Environment Trimble Access Management envrionment that the SDK will target.

consumerKey string The Trimble Cloud Console Client ID for your application.

consumerSecret string The Trimble Cloud Console Client Secret for your application.

applianceUrl string The appliance running in your environment (if needed) to evaluate decisions.

Example

var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddAccessManagement(environment, consumerKey, consumerSecret, applianceUrl);
using var host = builder.Build();