WSFederationAuthenticationModule 클래스

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 granular methods to make it easier for ASP.NET developers to reuse and extend its functionality in their applications.

네임스페이스: Microsoft.IdentityModel.Web
어셈블리: Microsoft.IdentityModel(microsoft.identitymodel.dll에 있음)

사용법

    Dim instance As WSFederationAuthenticationModule

구문

‘선언
Public Class WSFederationAuthenticationModule
    Inherits HttpModuleBase
public class WSFederationAuthenticationModule : HttpModuleBase
public ref class WSFederationAuthenticationModule : public HttpModuleBase
public class WSFederationAuthenticationModule extends HttpModuleBase
public class WSFederationAuthenticationModule extends HttpModuleBase

설명

WSFederationAuthenticationModule is added to the ASP.NET pipeline by making an entry in the web.config file. It implements IHttpModule, and registers with the ASP.NET runtime to listen for the AuthenticateRequest event. This lets it monitor requests for authentication cookies, and when these cookies are present and valid, to create an instance of IClaimsPrincipal for the authenticated user.

SessionAuthenticationModule monitors requests for authentication cookies. When these cookies are present and valid, the module creates a FederatedIdentity and IPrincipal for the authenticated user and sets the User and CurrentPrincipal properties.

The cookies are written as a result of calling SignIn with a token retrieved via an out-of-band method. SignIn is called automatically by the InformationCard and FederatedPassiveSignIn controls, which retrieve tokens using CardSpace and WS-Federation passive protocols, respectively.

A minimum configuration which enables the module resembles this:

<configuration>
  <system.web>
    <httpModules>
      <add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </httpModules>
  </system.web>
  <system.webServer>
    <modules>
      <add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler" />
    </modules>
  </system.webServer>
</configuration>

Once configured, the WSFederationAuthenticationModule raises events at various stages of processing an HTTP request. ASP.NET developers can handle these events in the global.asax file. For sample code, see How to: Protect Only Certain Parts of a Web Site using the Federated Authentication Module.

상속 계층 구조

System.Object
   Microsoft.IdentityModel.Web.HttpModuleBase
    Microsoft.IdentityModel.Web.WSFederationAuthenticationModule

스레드 안전성

이 유형의 공용 정적(Visual Basic에서는 Shared) 멤버는 모두 스레드로부터 안전합니다.인스턴스 멤버는 스레드로부터 안전하지 않을 수 있습니다.

플랫폼

개발 플랫폼

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

Change History

참고 항목

참조

WSFederationAuthenticationModule 멤버
Microsoft.IdentityModel.Web 네임스페이스