Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
FederatedPassiveSecurityTokenServiceOperations Class

FederatedPassiveSecurityTokenServiceOperations Class

.NET Framework 4.6 and 4.5

A utility class that encapsulates the operations typically performed by a Federated Passive Security Token Service.

System.Object
  System.IdentityModel.Services.FederatedPassiveSecurityTokenServiceOperations

Namespace:  System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public static class FederatedPassiveSecurityTokenServiceOperations

The FederatedPassiveSecurityTokenServiceOperations type exposes the following members.

  NameDescription
Public methodStatic memberProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse)Processes an incoming WS-Federation Passive Protocol request.
Public methodStatic memberProcessRequest(HttpRequest, ClaimsPrincipal, SecurityTokenService, HttpResponse, WSFederationSerializer)Processes an incoming WS-Federation Passive Protocol request by using the specified WS-Federation serializer.
Public methodStatic memberProcessSignInRequest(SignInRequestMessage, ClaimsPrincipal, SecurityTokenService)Processes an incoming WS-Federation Passive Protocol SignIn request.
Public methodStatic memberProcessSignInRequest(SignInRequestMessage, ClaimsPrincipal, SecurityTokenService, WSFederationSerializer)Processes an incoming WS-Federation Passive Protocol SignIn request by using the specified WS-Federation serializer.
Public methodStatic memberProcessSignInResponseProcesses a sign-in response message.
Public methodStatic memberProcessSignOutRequestProcesses an incoming WS-Federation Passive Protocol SignOut request.
Top

When implementing a passive security token service (STS), call the static methods exposed by this class from your code-behind to invoke an instance of your custom STS to process an incoming WS-Federation request message. You implement a custom STS by deriving from the SecurityTokenService class.

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

.NET Framework

Supported in: 4.6, 4.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft