ASPSecurityKitWebApiRegistry

Namespace: ASPSecurityKit.NetFramework.WebApi
Assembly: ASPSecurityKit.NetFramework.WebApi.dll

Summary

Encapsulates logic to register dependencies for ASP.NET Web API.

See Also

Constructors

#ctor()

Summary

Initializes a new instance of the ASPSecurityKitWebApiRegistry class.

Parameters

This constructor has no parameters.

Methods

Register(containerBuilder,authRequestDefinitionRegistrar,authRequestDefinitionType,controllerType,registrationOptions)

Summary

Registers the dependencies including authRequestDefinitions. To learn more about auth definitions (including the discovery and registration process), visit https://ASPSecurityKit.net/docs/how-to-perform-activity-based-data-aware-authorization/#auth-definition

Parameters
Name Type Description
containerBuilder ASPSecurityKit.IContainerBuilder The DI builder object.
authRequestDefinitionRegistrar ASPSecurityKit.Net.IAuthorizeRequestDefinitionRegistrar Optional. The object that registers and resolves authRequestDefinition. If not specified, the default is an instance of AuthorizeRequestDefinitionRegistrar.
authRequestDefinitionType System.Type Optional. Type of an authRequestDefinition implementation to indicate assembly containing the authRequestDefinitions.
controllerType System.Type Optional. Type of a controller implementation to indicate assembly containing the controllers.
registrationOptions ASPSecurityKit.Net.RegistrationOptions Optional. The registration options.
Exceptions
Type Description
System.ArgumentNullException When containerBuilder is null.

Register(containerBuilder,containerProvider,authRequestDefinitionRegistrar,authRequestDefinitionType,controllerType,registrationOptions)

Summary

Registers the dependencies including authRequestDefinitions.

Parameters
Name Type Description
containerBuilder ASPSecurityKit.IContainerBuilder The DI builder object.
containerProvider System.Func{System.Net.Http.HttpRequestMessage,ASPSecurityKit.IContainer} The lamda method expression which will return the DI container.
authRequestDefinitionRegistrar ASPSecurityKit.Net.IAuthorizeRequestDefinitionRegistrar Optional. The object that registers and resolves authRequestDefinition. If not specified, the default is an instance of AuthorizeRequestDefinitionRegistrar.
authRequestDefinitionType System.Type Optional. Type of an authRequestDefinition implementation to indicate assembly containing the authRequestDefinitions.
controllerType System.Type Optional. Type of a controller implementation to indicate assembly containing the controllers.
registrationOptions ASPSecurityKit.Net.RegistrationOptions Optional. The registration options.
Exceptions
Type Description
System.ArgumentNullException When containerBuilder or containerProvider is null.