Επεξεργασία

Κοινή χρήση μέσω


FederatedPassiveSecurityTokenServiceOperations.ProcessRequest Method

Definition

Processes an incoming WS-Federation Passive Protocol request.

Overloads

ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse)

Processes an incoming WS-Federation Passive Protocol request.

ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse, WSFederationSerializer)

Processes an incoming WS-Federation Passive Protocol request by using the specified WS-Federation serializer.

ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse)

Processes an incoming WS-Federation Passive Protocol request.

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)

Parameters

request
HttpRequest

The incoming HTTP request.

principal
ClaimsPrincipal

The principal associated with this request.

sts
SecurityTokenService

The security token service (STS) to use to issue tokens.

response
HttpResponse

The outgoing HTTP response.

Exceptions

request is null.

-or-

principal is null.

-or-

sts is null.

-or-

response is null.

Examples

The code example that is used in this topic is taken from the Custom Token sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT), and it includes an implementation of a passive STS that is capable of serving an SWT token. For information about this sample and other samples available for WIF and about where to download them, see WIF Code Sample Index. The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse) method from the code behind in the default.aspx.cs file.

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 );
        }
    }
}

Applies to

ProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse, WSFederationSerializer)

Processes an incoming WS-Federation Passive Protocol request by using the specified WS-Federation serializer.

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)

Parameters

request
HttpRequest

The incoming HTTP request.

principal
ClaimsPrincipal

The principal associated with this request.

sts
SecurityTokenService

The security token service (STS) to use to issue tokens.

response
HttpResponse

The outgoing HTTP response.

federationSerializer
WSFederationSerializer

The serializer to use for handling WS-Federation Passive Protocol messages.

Exceptions

request is null.

-or-

principal is null.

-or-

sts is null.

-or-

response is null.

Applies to