FederatedPassiveSecurityTokenServiceOperations.ProcessRequest 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
处理传入 WS-Federation Passive Protocol 请求。
重载
ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse) |
处理传入 WS-Federation Passive Protocol 请求。 |
ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse, WSFederationSerializer) |
通过使用指定的 WS-Federation 序列化程序处理传入 WS-Federation Passive Protocol 请求。 |
ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse)
处理传入 WS-Federation Passive Protocol 请求。
public:
static void ProcessRequest(System::Web::HttpRequest ^ request, System::Security::Claims::ClaimsPrincipal ^ principal, System::IdentityModel::SecurityTokenService ^ sts, System::Web::HttpResponse ^ response);
public static void ProcessRequest (System.Web.HttpRequest request, System.Security.Claims.ClaimsPrincipal principal, System.IdentityModel.SecurityTokenService sts, System.Web.HttpResponse response);
static member ProcessRequest : System.Web.HttpRequest * System.Security.Claims.ClaimsPrincipal * System.IdentityModel.SecurityTokenService * System.Web.HttpResponse -> unit
Public Shared Sub ProcessRequest (request As HttpRequest, principal As ClaimsPrincipal, sts As SecurityTokenService, response As HttpResponse)
参数
- request
- HttpRequest
传入的 HTTP 请求。
- principal
- ClaimsPrincipal
与此请求关联的主题。
要用于发布标记的安全标记服务 (STS)。
- response
- HttpResponse
输出的 HTTP 响应。
例外
示例
本主题中使用的代码示例取自 Custom Token
示例。 此示例提供自定义类,这些类支持处理简单 Web 令牌 (SWT) ,并包含能够为 SWT 令牌提供服务的被动 STS 的实现。 有关适用于 WIF 的此示例和其他示例以及下载位置的信息,请参阅 WIF 代码示例索引。 以下代码演示如何调用自定义被动 STS,以通过从 文件中的代码隐藏default.aspx.cs
调用 ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse) 方法来处理 WS-Federation 请求。
using System;
using System.IdentityModel.Services;
using System.Security.Claims;
namespace PassiveSTS
{
public partial class _Default : System.Web.UI.Page
{
/// <summary>
/// We perform the WS-Federation Passive Protocol processing in this method.
/// </summary>
protected void Page_PreRender( object sender, EventArgs e )
{
FederatedPassiveSecurityTokenServiceOperations.ProcessRequest( Request, User as ClaimsPrincipal, CustomSecurityTokenServiceConfiguration.Current.CreateSecurityTokenService(), Response );
}
}
}
适用于
ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse, WSFederationSerializer)
通过使用指定的 WS-Federation 序列化程序处理传入 WS-Federation Passive Protocol 请求。
public:
static void ProcessRequest(System::Web::HttpRequest ^ request, System::Security::Claims::ClaimsPrincipal ^ principal, System::IdentityModel::SecurityTokenService ^ sts, System::Web::HttpResponse ^ response, System::IdentityModel::Services::WSFederationSerializer ^ federationSerializer);
public static void ProcessRequest (System.Web.HttpRequest request, System.Security.Claims.ClaimsPrincipal principal, System.IdentityModel.SecurityTokenService sts, System.Web.HttpResponse response, System.IdentityModel.Services.WSFederationSerializer federationSerializer);
static member ProcessRequest : System.Web.HttpRequest * System.Security.Claims.ClaimsPrincipal * System.IdentityModel.SecurityTokenService * System.Web.HttpResponse * System.IdentityModel.Services.WSFederationSerializer -> unit
Public Shared Sub ProcessRequest (request As HttpRequest, principal As ClaimsPrincipal, sts As SecurityTokenService, response As HttpResponse, federationSerializer As WSFederationSerializer)
参数
- request
- HttpRequest
传入的 HTTP 请求。
- principal
- ClaimsPrincipal
与此请求关联的主题。
要用于发布标记的安全标记服务 (STS)。
- response
- HttpResponse
输出的 HTTP 响应。
- federationSerializer
- WSFederationSerializer
用于处理 WS-Federation Passive Protocol 消息的序列化程序。