TokenMagician.xml
<?xml version="1.0"?> <doc> <assembly> <name>TokenMagician</name> </assembly> <members> <member name="T:TokenMagician.GetMsiToken"> <summary> <para type="synopsis">Get a token using managed identity</para> <para type="description">Microsoft just released support for using managed identities as federated credentials, this library helps you get tokens.</para> </summary> <example> <para type="name">Get a token for Graph using system-assigned identity</para> <para type="description">This will use the system assigned managed identity to get a token</para> <code>Get-TmMsiToken -TenantId "svrooij.io" -ClientId "81386206-d7fb-402a-b9dd-a4ed5bc3ef71" -Scope https://graph.microsoft.com/.default</code> </example> <example> <para type="name">Get a token for Graph using user-assigned identity</para> <para type="description">This will use the user assigned managed identity to get a token</para> <code>Get-TmMsiToken -TenantId "svrooij.io" -ClientId "81386206-d7fb-402a-b9dd-a4ed5bc3ef71" -Scope https://graph.microsoft.com/.default -UserAssignedIdentity "a9f67427-921a-4aab-8c20-5a8a0acdd2a6"</code> </example> </member> <member name="P:TokenMagician.GetMsiToken.TenantId"> <summary> Specifies the tenant id for which you want a token </summary> </member> <member name="P:TokenMagician.GetMsiToken.ClientId"> <summary> Specify the client id of your multi-tenant application </summary> </member> <member name="P:TokenMagician.GetMsiToken.Scope"> <summary> Specify the scope for which you want a token (ending with `/.default`) </summary> </member> <member name="P:TokenMagician.GetMsiToken.MsiScope"> <summary> The MSI scope to use, defaults to `api://AzureADTokenExchange/.default`, see <see href="https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity">this page</see> for options </summary> </member> <member name="P:TokenMagician.GetMsiToken.UserAssignedIdentity"> <summary> The user assigned identity to use, if not set, the system assigned identity will be used </summary> </member> <member name="P:TokenMagician.GetMsiToken.DecodeToken"> <summary> Decode the tokens and return the claims </summary> </member> <member name="M:TokenMagician.GetMsiToken.ProcessRecordAsync(System.Threading.CancellationToken)"> <inheritdoc /> </member> <member name="T:TokenMagician.ModuleResolveEventHandler"> <summary> A class that initializes the module when it is imported into the session. </summary> </member> <member name="M:TokenMagician.ModuleResolveEventHandler.OnImport"> <summary> Called when the module is imported into the session, used to hook into the AssemblyLoadContext </summary> </member> <member name="M:TokenMagician.ModuleResolveEventHandler.OnRemove(System.Management.Automation.PSModuleInfo)"> <summary> Called when the module is removed from the session, used to cleanup the module. </summary> </member> <member name="T:TokenMagician.Startup"> <summary> The startup class for the module. </summary> </member> <member name="M:TokenMagician.Startup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)"> <summary> Configure the services for the module. </summary> <param name="services"></param> </member> <member name="M:TokenMagician.Startup.ConfigurePowerShellLogging"> <summary> Configure the logging for the module. </summary> <returns></returns> </member> <member name="T:Svrooij.PowerShell.DI.GenerateBindingsAttribute"> <summary> Tell the source generator to generate code to bind the dependencies instead of using reflection. </summary> <remarks>Your class has to be a partial class and extend <see cref="T:Svrooij.PowerShell.DI.DependencyCmdlet`1"/>.</remarks> </member> <member name="T:Svrooij.PowerShell.DI.ServiceDependencyAttribute"> <summary> Mark a field or property as a dependency that has to be resolved by the <see cref="T:System.IServiceProvider"/>. </summary> </member> <member name="P:Svrooij.PowerShell.DI.ServiceDependencyAttribute.Required"> <summary> Should the dependency be required, if it is not found an exception will be thrown. </summary> </member> <member name="T:Svrooij.PowerShell.DI.Logging.PowerShellLogger"> <summary> <see cref="T:Microsoft.Extensions.Logging.ILogger"/> that outputs to the PowerShell <see cref="T:System.Management.Automation.PSCmdlet"/> </summary> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLogger.#ctor(System.String,System.Func{Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration},System.Management.Automation.PSCmdlet)"> <summary> Constructor for <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLogger"/> </summary> <remarks>Called automatically by the <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider"/></remarks> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLogger.Log``1(Microsoft.Extensions.Logging.LogLevel,Microsoft.Extensions.Logging.EventId,``0,System.Exception,System.Func{``0,System.Exception,System.String})"> <inheritdoc/> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLogger.IsEnabled(Microsoft.Extensions.Logging.LogLevel)"> <inheritdoc/> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLogger.BeginScope``1(``0)"> <inheritdoc/> </member> <member name="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration"> <summary> Configuration for the <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider"/> </summary> </member> <member name="P:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration.DefaultLevel"> <summary> Minimum level of log messages to output </summary> </member> <member name="P:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration.LogLevel"> <summary> Override the minimum level for specific categories (Type Names) </summary> </member> <member name="P:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration.IncludeCategory"> <summary> Specify if the log message should be prefixed with the category name </summary> </member> <member name="P:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration.StripNamespace"> <summary> Strip the namespace from the category name </summary> </member> <member name="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider"> <summary> <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/> that outputs to the PowerShell <see cref="T:System.Management.Automation.PSCmdlet"/> </summary> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider.#ctor(Microsoft.Extensions.Options.IOptionsMonitor{Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration})"> <summary> Creates a new instance of <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider"/> </summary> <param name="config">Auto loaded configuration</param> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider.CreateLogger(System.String)"> <summary> Creates a new <see cref="T:Microsoft.Extensions.Logging.ILogger"/> instance. </summary> <param name="categoryName">Category name to use</param> <returns><see cref="T:Microsoft.Extensions.Logging.ILogger"/></returns> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider.Dispose"> <summary> Dispose the provider </summary> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PsCmdletExtensions.WriteLog(System.Management.Automation.PSCmdlet,Microsoft.Extensions.Logging.LogLevel,System.Int32,System.String,System.Exception)"> <summary> Write a log message to the provider PowerShell <see cref="T:System.Management.Automation.PSCmdlet"/> </summary> <param name="cmdlet"><see cref="T:System.Management.Automation.PSCmdlet"/> that is used for the log message</param> <param name="logLevel"><see cref="T:Microsoft.Extensions.Logging.LogLevel"/> for the message, will be put in from the message</param> <param name="eventId">The ID for this specific event</param> <param name="message">Log message</param> <param name="e">(optional) <see cref="T:System.Exception"/></param> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowershellLoggingBuilderExtensions.AddPowerShellLogging(Microsoft.Extensions.Logging.ILoggingBuilder,System.Management.Automation.PSCmdlet)"> <summary> Adds a PowerShell logger named 'PowerShell' to the logger factory. </summary> <param name="builder"><see cref="T:Microsoft.Extensions.Logging.ILoggingBuilder"/> that you get when you call serviceCollection.AddLogging(builder =>)</param> <param name="cmdlet">The <see cref="T:System.Management.Automation.PSCmdlet"/> that is used to output the log info</param> <returns><see cref="T:Microsoft.Extensions.Logging.ILoggingBuilder"/> to support chaining</returns> </member> <member name="M:Svrooij.PowerShell.DI.Logging.ServiceProviderLoggerExtensions.AddPowerShellLogging(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Management.Automation.PSCmdlet,System.Action{Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration})"> <summary> Adds a PowerShell logger named 'PowerShell' to the service collection. </summary> <param name="services"><see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> you want to add logging to</param> <param name="cmdlet"><see cref="T:System.Management.Automation.PSCmdlet"/> that is used to output the log info</param> <param name="configure">(optional) action to configure the <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration"/></param> <returns><see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> to support chaining</returns> <exception cref="T:System.ArgumentNullException">When one of the required arguments are not set</exception> </member> <member name="T:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext"> <summary> A synchronisation context that runs all calls scheduled on it (via <see cref="M:System.Threading.SynchronizationContext.Post(System.Threading.SendOrPostCallback,System.Object)"/>) on a single thread. </summary> <remarks>This part is taken from <see href="https://github.com/NTTLimitedRD/OctopusDeploy.Powershell/blob/7653993ffbf3ddfc7381e1196dbaa6fdf43cd982/OctopusDeploy.Powershell/ThreadAffinitiveSynchronizationContext.cs">OctopusDeploy.Powershell</see> licensed under <see href="https://github.com/NTTLimitedRD/OctopusDeploy.Powershell/blob/7653993ffbf3ddfc7381e1196dbaa6fdf43cd982/LICENSE">MIT</see></remarks> </member> <member name="F:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext._workItemQueue"> <summary> A blocking collection (effectively a queue) of work items to execute, consisting of callback delegates and their callback state (if any). </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.Dispose"> <summary> Dispose of resources being used by the synchronization context. </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.CheckDisposed"> <summary> Check if the synchronization context has been disposed. </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.RunMessagePump"> <summary> Run the message pump for the callback queue on the current thread. </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.TerminateMessagePump"> <summary> Terminate the message pump once all callbacks have completed. </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.Post(System.Threading.SendOrPostCallback,System.Object)"> <summary> Dispatch an asynchronous message to the synchronization context. </summary> <param name="callback"> The <see cref="T:System.Threading.SendOrPostCallback"/> delegate to call in the synchronization context. </param> <param name="callbackState"> Optional state data passed to the callback. </param> <exception cref="T:System.InvalidOperationException"> The message pump has already been started, and then terminated by calling <see cref="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.TerminateMessagePump"/>. </exception> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.RunSynchronized(System.Func{System.Threading.Tasks.Task})"> <summary> Run an asynchronous operation using the current thread as its synchronization context. </summary> <param name="asyncOperation"> A <see cref="T:System.Func`1"/> delegate representing the asynchronous operation to run. </param> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.RunSynchronized``1(System.Func{System.Threading.Tasks.Task{``0}})"> <summary> Run an asynchronous operation using the current thread as its synchronization context. </summary> <typeparam name="TResult"> The operation result type. </typeparam> <param name="asyncOperation"> A <see cref="T:System.Func`1"/> delegate representing the asynchronous operation to run. </param> <returns> The operation result. </returns> </member> <member name="T:Svrooij.PowerShell.DI.PsStartup"> <summary> Base class for startup classes for PowerShell cmdlets. Create a class that extends this class and override <see cref="M:Svrooij.PowerShell.DI.PsStartup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)"/>. </summary> <remarks> This class is called automatically by the <see cref="T:Svrooij.PowerShell.DI.DependencyCmdlet`1"/> constructor. Logging is automatically added to the <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>, please don't mess with the logging part. </remarks> </member> <member name="M:Svrooij.PowerShell.DI.PsStartup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)"> <summary> Override this method to configure the <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> needed by your application. </summary> <param name="services"><see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> that you can add services to.</param> <remarks>Logging is setup for you, overriding it breaks stuff!</remarks> </member> <member name="M:Svrooij.PowerShell.DI.PsStartup.ConfigurePowerShellLogging"> <summary> Override this method to configure the <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration"/> needed by your application. </summary> <code> return builder => { builder.MinimumLevel = LogLevel.Information; }; </code> </member> <member name="T:Svrooij.PowerShell.DI.DependencyCmdlet`1"> <summary> Base class for cmdlets that use dependency injection. <para>Use the <see cref="T:Svrooij.PowerShell.DI.GenerateBindingsAttribute"/> to tell the compiler to generate binding code instead of using reflection</para> </summary> <typeparam name="T">Your startup class that has to extend <see cref="T:Svrooij.PowerShell.DI.PsStartup"/> and extend <see cref="M:Svrooij.PowerShell.DI.PsStartup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)"/>.</typeparam> <remarks>You should override <see cref="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecordAsync(System.Threading.CancellationToken)"/>. A lot of other methods are blocked from overriding.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.#ctor"> <summary> <see cref="T:Svrooij.PowerShell.DI.DependencyCmdlet`1"/> constructor, called by PowerShell. </summary> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecordAsync(System.Threading.CancellationToken)"> <summary> Override this method to process each record. </summary> <param name="cancellationToken">The cancellation token will be called when the user presses CTRL+C during execution</param> <remarks>Your overridden method will be called automatically!</remarks> <exception cref="T:System.NotImplementedException">When not overridden</exception> <exception cref="T:System.InvalidOperationException">When one or more dependencies marked as required are not found</exception> </member> <member name="P:Svrooij.PowerShell.DI.DependencyCmdlet`1.BindDependencies"> <summary> Override this property to bind dependencies manually, the service provider is provided by the base library. </summary> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecord"> <summary> You can call ProcessRecord, but you cannot override it! </summary> <remarks>Override the <see cref="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecordAsync(System.Threading.CancellationToken)"/> method, which is called automatically.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.BeginProcessing"> <summary> You can call BeginProcessing, but you cannot override it! </summary> <remarks>This is called by PowerShell automatically. And is used to bind dependencies.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.StopProcessing"> <summary> You can call StopProcessing, but you cannot override it! </summary> <remarks>This is called by PowerShell if the user cancels the request. If is used to trigger the cancellationToken on <see cref="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecordAsync(System.Threading.CancellationToken)"/>.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.EndProcessing"> <summary> You can call EndProcessing, but you cannot override it! </summary> <remarks>This is called by PowerShell automatically.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.ServiceProviderExtensions.BindDependencies(System.IServiceProvider,System.Object)"> <summary> Use reflection to find all properties and fields with the <see cref="T:Svrooij.PowerShell.DI.ServiceDependencyAttribute"/> and set the value of the property or field using the service provider. </summary> <param name="serviceProvider"><see cref="T:System.IServiceProvider"/> to use to resolve dependencies</param> <param name="obj">The object where the dependencies have to be set</param> <exception cref="T:System.ArgumentNullException">if required arguments are not set</exception> <exception cref="T:System.InvalidOperationException">if a required dependency is not found</exception>" </member> </members> </doc> |