WSFederationAuthenticationModule 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.]

The WSFederationAuthenticationModule is an HTTP module that lets ASP.NET developers build claims aware applications. The WSFederationAuthenticationModule raises several events, which allows ASP.NET developers to customize its functionality in their applications. The WSFederationAuthenticationModule functionality is divided into task-specific methods to make it easier for ASP.NET developers to reuse and extend its functionality in their applications.

The following tables list the members exposed by the WSFederationAuthenticationModule type.

Public Constructors

  Name Description
  WSFederationAuthenticationModule Initializes a new instance of the WSFederationAuthenticationModule class.

Top

Public Properties

  Name Description
public property AuthenticationType Federation passive "wauth" property.
public property Freshness This is an optional property applicable when FederationAuthenticationModule. PassiveRedirectEnabled is set to true. Use this property to get or set and optional parameter that identifies the desired maximum age of authentication specified in minutes.
public property HomeRealm Identity provider address.
public property Issuer This is a required property if PassiveRedirectEnabled is set to true. It specifies the URL of the STS where the caller is redirected to for authentication.
public property PassiveRedirectEnabled Specifies whether the module is enabled to initiate WS-Federation passive protocol redirects. This mode of operation of the module enables its use in scenarios that do not employ the Federated Passive SignIn ASP.NET control.
public property PersistentCookiesOnPassiveRedirects Specifies whether persistent cookies are issued when the module is enabled to initiate WS-Federation passive protocol redirects.
public property Policy Federation passive "wp" property.
public property Realm This is a required property if PassiveRedirectEnabled is set to true. Get or set a required property that is a URI identifying the relying party to the STS. (For identifying the STS to the RP, see Issuer).
public property Reply This is an optional property if PassiveRedirectEnabled is set to true. Get or set this optional parameter to a URL identifying the relying party to the STS.
public property Request This is an optional property applicable when PassiveRedirectEnabled is set to true. Get or set this optional parameter to send the request as a WS-Trust Request Security Token <RST> element.
public property RequestPtr This is an optional property applicable when PassiveRedirectEnabled is set to true. Get or set an optional parameter that contains a pointer to the request as a Request Security Token <RST> element.
public property RequireHttps If true, the communication with the passive STS must take place over an https: protocol.
public property Resource This is an optional property applicable when PassiveRedirectEnabled is set to true. Get or set this optional parameter to a URI that identifies the resource being accessed (relying party) to the STS.
public property ServiceConfiguration  Gets or sets the ServiceConfiguration in effect for this module. (Inherited from HttpModuleBase)
public property SignInContext RP or STS defined context parameter.
public property SignInQueryString Query string of request, which may contain other message parameters.
public property SignOutQueryString Additional signout query strings.
public property SignOutReply Url to return to after signout.
public property XmlDictionaryReaderQuotas Gets/Sets the XmlDictionaryReaderQuotas.

Top

Public Methods

(see also Protected Methods)

  Name Description
public method CanReadSignInResponse Overloaded. Determines if request is a WS-Federation Passive Protocol SignIn Response message from the STS.
public method CreateSignInRequest Creates a WS-Federation Passive Protocol SignIn Request, using the WS-Federation parameters configured on the module.
public method Dispose  Disposes of the resources used by the module. (Inherited from HttpModuleBase)
public method Equals  (Inherited from Object)
public methodstatic FederatedSignOut Sign out according to the WS-Federation protocol.
public methodstatic GetFederationPassiveSignOutUrl Gets the complete WS-Federation Passive signout url.
public method GetHashCode  (Inherited from Object)
public method GetSecurityToken Overloaded. Reads a SecurityToken.
public method GetSignInResponseMessage Reads a SignInResponseMessage from the given HttpRequest.
public method GetType  (Inherited from Object)
public method GetXmlTokenFromMessage Overloaded.  
public method Init  Initializes the module. (Inherited from HttpModuleBase)
public method IsSignInResponse Returns true if request is recognized as a SignIn response.
public method RedirectToIdentityProvider Redirect user to identity provider STS for obtaining a token using WS-Federation Passive Protocol.
public method SetPrincipalAndWriteSessionToken Set the thread principal and write the cookie.
public method SignOut Sign out and raise appropriate events.
public method ToString  (Inherited from Object)
public method VerifyProperties Verifies that the Issuer and realm are non-empty and that, if HTTPS is required, the issuer and reply are HTTPS.

Top

Protected Methods

  Name Description
protected method Finalize  (Inherited from Object)
protected method GetReferencedResult Get the wresult string from a referenced URL.
protected method GetReturnUrlFromResponse Extract the originally requested page (ReturnUrl) from the response.
protected method GetSessionTokenContext Context to be persisted with the cookie. When using WS-Federation Passive protocol, we concatenate a type name to the signout url so we can initiate the signout protocol.
protected method GetSignOutRedirectUrl Determines the url to redirect to when processing a federated sign-out request containing a wreply parameter.
protected method InitializeModule Overridden. Initializes a module and prepares it to handle requests.
protected method InitializePropertiesFromConfiguration Initialize module properties based on definitions in the configuration file.
protected method MemberwiseClone  (Inherited from Object)
protected method OnAuthenticateRequest Handle the HTTP pipeline AuthenticateRequest event, after ensuring that the module has been initialized.
protected method OnAuthorizationFailed Raise the AuthorizationFailed event.
protected method OnEndRequest Handle the HTTP pipeline EndRequest event.
protected method OnPostAuthenticateRequest Event handler for Application.PostAuthenticateRequest
protected method OnRedirectingToIdentityProvider Raise the RedirectingToIdentityProvider event.
protected method OnSessionSecurityTokenCreated Raise the SessionSecurityTokenCreated event.
protected method OnSignedIn Raise the SignedIn event.
protected method OnSignedOut Raise the SignedOut event.
protected method OnSignInError Raise the SignInError event.
protected method OnSigningOut Raise the SigningOut event.
protected method OnSignOutError Raise the SignOutError event.

Top

Public Events

  Name Description
public event AuthorizationFailed Occurs when the WSFederationAuthenticationModule is determining if it should redirect the user to the Identity summary. This event fires when authorization has failed for a HTTP request. Redirecting to IdentityProvider is controlled by setting the RedirectToIdentityProvider property on the AuthorizationFailedEventArgs. The RedirectingToIdentityProvider event can be used to modify the URL or cancel the redirect.To handle this event in an ASP.NET application, create a method called WSFederationAuthentication_AuthorizationFailed in the global.asax file.
public event RedirectingToIdentityProvider Occurs when the WSFederationAuthenticationModule is going to redirect the user to the Identity Provider. This event handler can be used to change the SignInRequestMessage.
public event SecurityTokenReceived Occurs when a security token has been received for processing.
public event SecurityTokenValidated Occurs when a security token has been received for processing.
public event SessionSecurityTokenCreated Occurs when a session security token has been created.
public event SignedIn Event raised after the user is signed in.
public event SignedOut Event raised after the user is signed out.
public event SignInError Event raised when a signin error occurs.
public event SigningOut Occurs before deleting the sign-in session.
public event SignOutError Event raised when signout error occurs.

Top

See Also

Reference

WSFederationAuthenticationModule Class
Microsoft.IdentityModel.Web Namespace

Copyright © 2008 by Microsoft Corporation. All rights reserved.