SessionAuthenticationModule Members
[Starting with the .NET Framework 4.5, Windows Identity Foundation (WIF) has been fully integrated into the .NET Framework. The version of WIF addressed by this topic, WIF 3.5, is deprecated and should only be used when developing against the .NET Framework 3.5 SP1 or the .NET Framework 4. For more information about WIF in the .NET Framework 4.5, also known as WIF 4.5, see the Windows Identity Foundation documentation in the .NET Framework 4.5 Development Guide.]
When the STS issues a security token for the user, SessionAuthenticationModule also creates a session security token for the user and places it in a cookie. On subsequent requests, the SessionAuthenticationModule intercepts this cookie and uses it to reconstruct the user’s IClaimsPrincipal.
The following tables list the members exposed by the SessionAuthenticationModule type.
Public Constructors
Name | Description | |
---|---|---|
SessionAuthenticationModule | Initializes an instance of SessionAuthenticationModule. |
Top
Public Properties
Name | Description | |
---|---|---|
ContextSessionSecurityToken | Returns the active SessionSecurityToken for the current HttpContext. | |
CookieHandler | The CookieHandler used to read, write, and delete session cookies. | |
IsSessionMode | Get or sets if mode is session. | |
ServiceConfiguration | Gets or sets the ServiceConfiguration in effect for this module. (Inherited from HttpModuleBase) |
Top
Public Methods
(see also Protected Methods)
Name | Description | |
---|---|---|
AuthenticateSessionSecurityToken | Authenticates the incoming request by updating the current HTTP context and thread principal with the provided SessionSecurityToken. | |
ContainsSessionTokenCookie | Determines if a session cookie is in the provided cookie collection. | |
CreateSessionSecurityToken | Creates a SessionSecurityToken using the configured handler. | |
DeleteSessionTokenCookie | Deletes any session cookies. | |
Dispose | Disposes of the resources used by the module. (Inherited from HttpModuleBase) | |
Equals | (Inherited from Object) | |
GetHashCode | (Inherited from Object) | |
GetType | (Inherited from Object) | |
Init | Initializes the module. (Inherited from HttpModuleBase) | |
ReadSessionTokenFromCookie | Reads a SessionSecurityToken from a session cookie. | |
SignOut | Sign out the current user and fire the associated events. | |
ToString | (Inherited from Object) | |
TryReadSessionTokenFromCookie | Reads a SessionSecurityToken from a session cookie and returns a value that indicates whether the session cookie was read. | |
WriteSessionTokenToCookie | Writes a SessionSecurityToken to a session cookie. |
Top
Protected Methods
Name | Description | |
---|---|---|
Finalize | (Inherited from Object) | |
InitializeModule | Overridden. Initializes the module and prepares it to handle events from the module's ASP.NET application object. | |
InitializePropertiesFromConfiguration | Initialize module properties based on definitions in the configuration file. | |
MemberwiseClone | (Inherited from Object) | |
OnAuthenticateRequest | Handles AuthenticateRequest event from the ASP.NET pipeline. Checks if a cookie is present and reads the cookie as a SessionSecurityToken. Raises the OnSessionSecurityTokenReceived event. Sets the Thread.CurrentPrincipal to ClaimsPrincipal. Raises the OnSignInError event when the SessionSecurityToken fails validation. | |
OnPostAuthenticateRequest | Event handler for Application.PostAuthenticateRequest | |
OnSessionSecurityTokenCreated | Raise the SessionSecurityTokenCreated event. | |
OnSessionSecurityTokenReceived | Raise the SessionSecurityTokenReceived event. | |
OnSignedOut | Raise the SignedOut event. | |
OnSigningOut | Raise the SigningOut event. | |
OnSignOutError | Raise the SignOutError event. | |
SetPrincipalFromSessionToken | Sets the principals on the HttpContext and Thread to that of the provided session token. | |
ValidateSessionToken | Ensures that the SessionSecurityToken is valid. |
Top
Public Events
Name | Description | |
---|---|---|
SessionSecurityTokenCreated | Occurs when a session security token has been created. | |
SessionSecurityTokenReceived | Occurs when a session security token has been read from a cookie. | |
SignedOut | Event raised after the user is signed out. | |
SigningOut | Occurs before deleting the sign-in session. | |
SignOutError | Event raised when signout error occurs. |
Top
See Also
Reference
SessionAuthenticationModule Class
Microsoft.IdentityModel.Web Namespace
Copyright © 2008 by Microsoft Corporation. All rights reserved.