Class AuthorizationServices
Provides methods for configuring AMI authorization in DI environment.
Inherited Members
Namespace: DotNext.Maintenance.CommandLine.Authorization
Assembly: DotNext.MaintenanceServices.dll
Syntax
public static class AuthorizationServices
Methods
| Edit this page View SourceUseApplicationMaintenanceInterfaceGlobalAuthorization(IServiceCollection, AuthorizationCallback)
Enables global authorization rule to be applied to all maintenance commands.
Declaration
public static IServiceCollection UseApplicationMaintenanceInterfaceGlobalAuthorization(this IServiceCollection services, AuthorizationCallback callback)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
AuthorizationCallback | callback | Authorization callback. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
UseApplicationMaintenanceInterfaceGlobalAuthorization<TDependency>(IServiceCollection, Func<TDependency, AuthorizationCallback>)
Enables global authorization rule to be applied to all maintenance commands.
Declaration
public static IServiceCollection UseApplicationMaintenanceInterfaceGlobalAuthorization<TDependency>(this IServiceCollection services, Func<TDependency, AuthorizationCallback> callbackFactory) where TDependency : notnull
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
Func<TDependency, AuthorizationCallback> | callbackFactory | Authorization callback factory. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
Type Parameters
Name | Description |
---|---|
TDependency | The type of the dependency. |