Table of Contents

Class InMemoryCorsPolicyService

Namespace
Duende.IdentityServer.Services
Assembly
Duende.IdentityServer.dll

An ICorsPolicyService for use with clients configured with AddInMemoryClients. This service will allow any origin included in any client's AllowedCorsOrigins.

public class InMemoryCorsPolicyService : ICorsPolicyService
Inheritance
InMemoryCorsPolicyService
Implements
ICorsPolicyService
Inherited Members

Constructors

InMemoryCorsPolicyService(ILogger<InMemoryCorsPolicyService>, IEnumerable<Client>)

Initializes a new instance of the InMemoryCorsPolicyService class.

public InMemoryCorsPolicyService(ILogger<InMemoryCorsPolicyService> logger, IEnumerable<Client> clients)

Parameters

logger ILogger<InMemoryCorsPolicyService>

The logger

clients IEnumerable<Client>

The clients.

Fields

Clients

Clients applications list

protected readonly IEnumerable<Client> Clients

Field Value

IEnumerable<Client>

Logger

Logger

protected readonly ILogger Logger

Field Value

ILogger

Methods

IsOriginAllowedAsync(string)

Determines whether origin is allowed.

public virtual Task<bool> IsOriginAllowedAsync(string origin)

Parameters

origin string

The origin.

Returns

Task<bool>