Table of Contents

Class CacheTicketStoreExtension

Namespace
Arc4u.OAuth2.TicketStore
Assembly
Arc4u.OAuth2.AspNetCore.Authentication.dll

Registers the CacheTicketStore.

public static class CacheTicketStoreExtension
Inheritance
CacheTicketStoreExtension
Inherited Members

Methods

AddCacheTicketStore(IServiceCollection, IConfiguration, string)

Registers the CacheTicketStore with the options of a configuration section.

public static void AddCacheTicketStore(this IServiceCollection services, IConfiguration configuration, string sectionName = "AuthenticationCacheTicketStore")

Parameters

services IServiceCollection

The service collection.

configuration IConfiguration

The configuration.

sectionName string

The section holding the CacheTicketStoreOptions. The default is AuthenticationCacheTicketStore. The default values of the options are used when the section does not exist.

Exceptions

ConfigurationException

The ticket store cannot be created.

AddCacheTicketStore(IServiceCollection, Action<CacheTicketStoreOptions>)

Registers the CacheTicketStoreOptions and the CacheTicketStore as ITicketStore, unless another ticket store is already registered.

public static void AddCacheTicketStore(this IServiceCollection services, Action<CacheTicketStoreOptions> action)

Parameters

services IServiceCollection

The service collection.

action Action<CacheTicketStoreOptions>

The action that configures the options.

Examples

builder.Services.AddCacheTicketStore(o =>
{
    o.CacheName = "Default";
    o.KeyPrefix = "AuthSessionStore-";
});