WSFederationAuthenticationModule.RedirectToIdentityProvider(String, String, Boolean) Método

Definição

Redireciona o usuário para o STS (serviço de token de segurança) especificado pela propriedade Issuer para obter o token de segurança usando o protocolo Web Services Federation.Redirects the user to the security token service (STS) specified by the Issuer property to obtain a security token using the WS-Federation protocol.

public:
 virtual void RedirectToIdentityProvider(System::String ^ uniqueId, System::String ^ returnUrl, bool persist);
public virtual void RedirectToIdentityProvider (string uniqueId, string returnUrl, bool persist);
abstract member RedirectToIdentityProvider : string * string * bool -> unit
override this.RedirectToIdentityProvider : string * string * bool -> unit
Public Overridable Sub RedirectToIdentityProvider (uniqueId As String, returnUrl As String, persist As Boolean)

Parâmetros

uniqueId
String

O WSFAM salva esse valor no parâmetro wctx na solicitação de entrada do Web Services Federation, no entanto, o módulo não o utiliza ao processar solicitações de entrada ou respostas de entrada.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. Você pode defini-lo para qualquer valor.You can set it to any value. Não precisa ser exclusivo.It does not have to be unique. Para obter mais informações, consulte o método CreateSignInRequest(String, String, Boolean).For more information, see the CreateSignInRequest(String, String, Boolean) method.

returnUrl
String

A URL para a qual o módulo deve retornar após a autenticação.The URL to which the module should return upon authentication.

persist
Boolean

O WSFAM salva esse valor no parâmetro wctx na solicitação de entrada do Web Services Federation, no entanto, o módulo não o utiliza ao processar solicitações de entrada ou respostas de entrada.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. É possível defini-lo como true ou false.You can set it either true or false.

Exceções

Issuer é null ou é uma cadeia de caracteres vazia.Issuer is null or an empty string.

- ou --or- Realm é null ou é uma cadeia de caracteres vazia.Realm is null or an empty string.

- ou --or- A propriedade Current é null ou vazia.The Current property is null or empty.

- ou --or- A propriedade Response do contexto retornado por Current é null ou vazia.The Response property of the context returned by Current is null or empty.

Comentários

O RedirectToIdentityProvider método é chamado a partir do SignIn método quando a solicitação é emitida de uma página da Web apresentada pela parte confiável (RP) ou do OnEndRequest delegado manipulador de eventos para executar um redirecionamento passivo para o provedor de identidade em caso de falha de autorização.The RedirectToIdentityProvider 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.

Os parâmetros passados para o método são usados para criar o parâmetro de mensagem wctx.The parameters passed to the method are used to create the wctx message parameter. O único parâmetro significativo é o returnUrl parâmetro.The only significant parameter is the returnUrl parameter. Isso especifica a URL que o RP deve direcionar o navegador para a seguinte autenticação bem-sucedida.This specifies the URL that the RP should direct the browser to following successful authentication. Não deve ser confundido com o parâmetro de mensagem Wreply, que é especificado pela Reply propriedade e que fornece o endereço na RP para o qual o STS (serviço de token de segurança) deve direcionar sua resposta.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.

O método executa o seguinte:The method performs the following:

  1. Invoca o VerifyProperties método para garantir que uma solicitação de entrada válida possa ser emitida pelo módulo.Invokes the VerifyProperties method to ensure that a valid sign-in request can be issued by the module.

  2. Invoca o CreateSignInRequest método para criar a solicitação de entrada das propriedades configuradas no módulo.Invokes the CreateSignInRequest method to create the sign-in request from the properties configured on the module.

  3. Invoca o OnRedirectingToIdentityProvider método para gerar o RedirectingToIdentityProvider evento.Invokes the OnRedirectingToIdentityProvider method to raise the RedirectingToIdentityProvider event. Você pode cancelar o redirecionamento ou modificar a mensagem de solicitação de entrada no manipulador de eventos para este evento.You can cancel the redirect or modify the sign-in request message in the event handler for this event.

Aplica-se a