Redirects the user to the security token service (STS) specified by the Issuer property to obtain a security token using the WS-Federation protocol.
Assembly: System.IdentityModel.Services (in System.IdentityModel.Services.dll)
public virtual void RedirectToIdentityProvider( string uniqueId, string returnUrl, bool persist )
- Type: System.String
The WSFAM saves this value in the wctx parameter in the WS-Federation sign in request; however, the module does not use it when processing sign-in requests or sign-in responses. You can set it to any value. It does not have to be unique. For more information, see the CreateSignInRequest method.
- Type: System.String
The URL to which the module should return upon authentication.
- Type: System.Boolean
The WSFAM saves this value in the wctx parameter in the WS-Federation sign in request; however, the module does not use it when processing sign-in requests or sign-in responses. You can set it either true or false.
The method is called from the SignIn method when the request is issued from a web page presented by the relying party (RP) or from the OnEndRequest event-handler delegate to perform a passive redirect to the identity provider on authorization failure.
The parameters passed to the method are used to create the wctx message parameter. The only significant parameter is the returnUrl parameter. This specifies the URL that the RP should direct the browser to following successful authentication. It should not be confused with the wreply message parameter, which is specified by the Reply property and which provides the address at the RP to which the security token service (STS) should direct its response.
The method performs the following:
Invokes the VerifyProperties method to ensure that a valid sign-in request can be issued by the module.
Invokes the CreateSignInRequest method to create the sign-in request from the properties configured on the module.
Invokes the OnRedirectingToIdentityProvider method to raise the RedirectingToIdentityProvider event. You can cancel the redirect or modify the sign-in request message in the event handler for this event.