C# Class Microsoft.AspNetCore.Authentication.ActiveDirectory.AuthenticationStateCache

An in-memory cache for the login handshakes
Exibir arquivo Open project: OneBitSoftware/Microsoft.AspNetCore.Authentication.ActiveDirectory

Public Methods

Method Description
Add ( string key, HandshakeState state ) : void

Add a new state to the cache

Add ( string key, HandshakeState state, Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options ) : void

Add a new state to the cache and set a custom cache item policy

AuthenticationStateCache ( ) : System

Create an authentication state cache

TryGet ( string key, HandshakeState &state ) : bool

Try to get a state by its key

TryRemove ( string key ) : void

Remove a key

Private Methods

Method Description
GetCacheEntryOptions ( int minutes ) : Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions

Gets a cache item policy.

Method Details

Add() public method

Add a new state to the cache
public Add ( string key, HandshakeState state ) : void
key string
state HandshakeState
return void

Add() public method

Add a new state to the cache and set a custom cache item policy
public Add ( string key, HandshakeState state, Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options ) : void
key string
state HandshakeState
options Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions
return void

AuthenticationStateCache() public method

Create an authentication state cache
public AuthenticationStateCache ( ) : System
return System

TryGet() public method

Try to get a state by its key
public TryGet ( string key, HandshakeState &state ) : bool
key string
state HandshakeState
return bool

TryRemove() public method

Remove a key
public TryRemove ( string key ) : void
key string
return void