C# Класс NContext.Security.SecurityManagerBuilder

Defines a configuration class to build the application's SecurityManager.
Наследование: ApplicationComponentConfigurationBuilderBase
Показать файл Открыть проект

Открытые методы

Метод Описание
SecurityManagerBuilder ( ApplicationConfigurationBuilder applicationConfigurationBuilder ) : System

Initializes a new instance of the SecurityManagerBuilder class.

SetCacheProviderName ( String cacheProviderName ) : SecurityManagerBuilder
SetTokenExpirationPolicy ( System.TimeSpan expiration, System.Boolean isAbsolute = false ) : SecurityManagerBuilder

Sets the security token expiration policy. When used with SecurityManager.SavePrincipal, SecurityManager will cache the IPrincipal instance that is associated with the token. Subsequent calls to SecurityManager.GetPrincipal will return the cached IPrincipal. By default security tokens / principals do not expire. By setting an expiration value, the token will expire from cache. If isAbsolute is false, then the cache entry will be evicted if it has not been accessed in the given span of time (expiration). If isAbsolute is true, then the cache entry will be evicted after a specified duration (the DateTime the cache entry was created + expiration).

Защищенные методы

Метод Описание
Setup ( ) : void

Sets the application's security manager using the configuration created from this instance.

Описание методов

SecurityManagerBuilder() публичный Метод

Initializes a new instance of the SecurityManagerBuilder class.
public SecurityManagerBuilder ( ApplicationConfigurationBuilder applicationConfigurationBuilder ) : System
applicationConfigurationBuilder ApplicationConfigurationBuilder The application configuration.
Результат System

SetCacheProviderName() публичный Метод

public SetCacheProviderName ( String cacheProviderName ) : SecurityManagerBuilder
cacheProviderName String
Результат SecurityManagerBuilder

SetTokenExpirationPolicy() публичный Метод

Sets the security token expiration policy. When used with SecurityManager.SavePrincipal, SecurityManager will cache the IPrincipal instance that is associated with the token. Subsequent calls to SecurityManager.GetPrincipal will return the cached IPrincipal. By default security tokens / principals do not expire. By setting an expiration value, the token will expire from cache. If isAbsolute is false, then the cache entry will be evicted if it has not been accessed in the given span of time (expiration). If isAbsolute is true, then the cache entry will be evicted after a specified duration (the DateTime the cache entry was created + expiration).
public SetTokenExpirationPolicy ( System.TimeSpan expiration, System.Boolean isAbsolute = false ) : SecurityManagerBuilder
expiration System.TimeSpan The expiration time span.
isAbsolute System.Boolean The method which to use for evicting cached token / principals.
Результат SecurityManagerBuilder

Setup() защищенный Метод

Sets the application's security manager using the configuration created from this instance.
protected Setup ( ) : void
Результат void