Class RestApiClientFactory
Defines a client factory that creates clients that communicates using the Rest APi
Inheritance
Implements
Namespace: ImageVault.Client
Assembly: ImageVault.Client.dll
Syntax
public class RestApiClientFactory : Object, IClientFactory
Constructors
RestApiClientFactory(ImageVaultClientOptions, IObjectCache, IClientSecurityManager, ILogger<RestApiClientFactory>, ICurrentPrincipalAccessor)
Constructor for legacy applications (needing a IClientSecurityManager)
Declaration
public RestApiClientFactory(ImageVaultClientOptions options, IObjectCache objectCache, IClientSecurityManager clientSecurityManager, ILogger<RestApiClientFactory> logger, ICurrentPrincipalAccessor currentPrincipalAccessor)
Parameters
Type | Name | Description |
---|---|---|
ImageVaultClientOptions | options | |
IObjectCache | objectCache | |
IClientSecurityManager | clientSecurityManager | The client security manager to use or null if Claims based principals is used |
Microsoft.Extensions.Logging.ILogger<RestApiClientFactory> | logger | |
ICurrentPrincipalAccessor | currentPrincipalAccessor |
RestApiClientFactory(IOptions<ImageVaultClientOptions>, IObjectCache, IClientSecurityManager, ILogger<RestApiClientFactory>, ICurrentPrincipalAccessor)
Constructor for legacy applications (needing a IClientSecurityManager)
Declaration
public RestApiClientFactory(IOptions<ImageVaultClientOptions> options, IObjectCache objectCache, IClientSecurityManager clientSecurityManager, ILogger<RestApiClientFactory> logger, ICurrentPrincipalAccessor currentPrincipalAccessor)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptions<ImageVaultClientOptions> | options | |
IObjectCache | objectCache | |
IClientSecurityManager | clientSecurityManager | |
Microsoft.Extensions.Logging.ILogger<RestApiClientFactory> | logger | |
ICurrentPrincipalAccessor | currentPrincipalAccessor |
RestApiClientFactory(IOptions<ImageVaultClientOptions>, IObjectCache, ILogger<RestApiClientFactory>)
Constructor for modern applications that uses System.Threading.Thread.CurrentPrincipal for current user lookup
Declaration
public RestApiClientFactory(IOptions<ImageVaultClientOptions> options, IObjectCache objectCache, ILogger<RestApiClientFactory> logger)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptions<ImageVaultClientOptions> | options | |
IObjectCache | objectCache | |
Microsoft.Extensions.Logging.ILogger<RestApiClientFactory> | logger |
RestApiClientFactory(IOptions<ImageVaultClientOptions>, IObjectCache, ILogger<RestApiClientFactory>, ICurrentPrincipalAccessor)
Constructor for modern applications
Declaration
public RestApiClientFactory(IOptions<ImageVaultClientOptions> options, IObjectCache objectCache, ILogger<RestApiClientFactory> logger, ICurrentPrincipalAccessor currentPrincipalAccessor)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptions<ImageVaultClientOptions> | options | |
IObjectCache | objectCache | |
Microsoft.Extensions.Logging.ILogger<RestApiClientFactory> | logger | |
ICurrentPrincipalAccessor | currentPrincipalAccessor |
Properties
ClaimTypeRemapper
Mapper for the RestApiClientFactory. If not set, the DefaultClaimTypeRemapper is used.
Declaration
public ClaimTypeRemapper ClaimTypeRemapper { get; set; }
Property Value
Type | Description |
---|---|
ClaimTypeRemapper |
DefaultClaimTypeRemapper
Default mapper for the RestApiClientFactory. Changes to this instance will affect all RestApiClientFactory that don't specifically sets an own ClaimTypeRemapper
Declaration
public static ClaimTypeRemapper DefaultClaimTypeRemapper { get; }
Property Value
Type | Description |
---|---|
ClaimTypeRemapper |
Methods
GetCurrentUserClient()
Returns a client that uses the current user credentials
Declaration
public Client GetCurrentUserClient()
Returns
Type | Description |
---|---|
Client |
GetSdkClient()
returns a client that uses the sdk user credentials
Declaration
public Client GetSdkClient()
Returns
Type | Description |
---|---|
Client |