C# Class NContext.Security.SecurityManagerBuilder

Defines a configuration class to build the application's SecurityManager.
Inheritance: ApplicationComponentConfigurationBuilderBase
Afficher le fichier Open project: PowerDMS/NContext

Méthodes publiques

Méthode Description
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).

Méthodes protégées

Méthode Description
Setup ( ) : void

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

Method Details

SecurityManagerBuilder() public méthode

Initializes a new instance of the SecurityManagerBuilder class.
public SecurityManagerBuilder ( ApplicationConfigurationBuilder applicationConfigurationBuilder ) : System
applicationConfigurationBuilder ApplicationConfigurationBuilder The application configuration.
Résultat System

SetCacheProviderName() public méthode

public SetCacheProviderName ( String cacheProviderName ) : SecurityManagerBuilder
cacheProviderName String
Résultat SecurityManagerBuilder

SetTokenExpirationPolicy() public méthode

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.
Résultat SecurityManagerBuilder

Setup() protected méthode

Sets the application's security manager using the configuration created from this instance.
protected Setup ( ) : void
Résultat void