Click or drag to resize

SessionHandler Class

Represents an HTTP messaging handler that can inject a session ID that can be used for security and user state.
Inheritance Hierarchy
SystemObject
  System.Net.HttpHttpMessageHandler
    System.Net.HttpDelegatingHandler
      GSF.Web.SecuritySessionHandler

Namespace: GSF.Web.Security
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.207-beta
Syntax
public class SessionHandler : DelegatingHandler
View Source

The SessionHandler type exposes the following members.

Constructors
 NameDescription
Public methodSessionHandler Creates a new SessionHandler.
Top
Properties
 NameDescription
Public propertyAuthenticationToken Gets the token used for identifying the authentication token in cookie headers.
Public propertyInnerHandlerGets or sets the inner handler which processes the HTTP response messages.
(Inherited from DelegatingHandler)
Public propertyStatic memberSessionMonitorInterval Gets interval, in milliseconds, over which the client session cache will be evaluated for expired sessions.
Public propertyStatic memberSessionTimeout Gets timeout, in minutes, for which inactive client sessions will be expired and removed from the cache.
Public propertySessionToken Gets the token used for identifying the session ID in cookie headers.
Top
Methods
 NameDescription
Public methodStatic memberClearSessionCache Clears any cached session for the specified sessionID.
Public methodDisposeReleases the unmanaged resources and disposes of the managed resources used by the HttpMessageHandler.
(Inherited from HttpMessageHandler)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the DelegatingHandler, and optionally disposes of the managed resources.
(Inherited from DelegatingHandler)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodStatic memberGetAuthenticationTokenFromCookie(HttpRequestMessage, String) Gets the authentication token as defined in the request cookie header values.
Public methodStatic memberGetAuthenticationTokenFromCookie(IOwinRequest, String) Gets the authentication token as defined in the request cookie header values.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodStatic memberGetSessionIDFromCookie(HttpRequestMessage, String) Gets the session ID Guid as defined in the request cookie header values.
Public methodStatic memberGetSessionIDFromCookie(IOwinRequest, String) Gets the session ID Guid as defined in the Owin cookie header values.
Public methodStatic memberGetSessionIDFromCookie(IRequest, String) Gets the session ID Guid as defined in the SignalR cookie header values.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodSendAsync Modifies the HTTP request message pipeline to include a session identifier.
(Overrides DelegatingHandlerSendAsync(HttpRequestMessage, CancellationToken))
Public methodStatic memberSetCookie Gets the session state as defined in the request cookie header values.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodStatic memberTryGetCachedCredentials Attempts to use the authentication token to retrieve the user's credentials from the credential cache.
Public methodStatic memberTryGetSessionID Tries to get the session ID Guid as defined in the request properties dictionary.
Public methodStatic memberTryGetSessionState Tries to get the session state as defined in the request properties dictionary.
Top
Events
 NameDescription
Public eventStatic memberProcessException Occurs when a static method encounters an exception.
Public eventStatic memberSessionExpired Raised when a client session is being expired.
Top
Fields
 NameDescription
Public fieldStatic memberDefaultAuthenticationToken Default value for AuthenticationToken;
Public fieldStatic memberDefaultSessionExpirationDays Default value for a cached session expiration, in days.
Public fieldStatic memberDefaultSessionMonitorInterval Default value for SessionMonitorInterval.
Public fieldStatic memberDefaultSessionTimeout Default value for SessionTimeout.
Public fieldStatic memberDefaultSessionToken Default value for SessionToken;
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also