Compartilhar via


IAuthenticationModule.CanPreAuthenticate Propriedade

Definição

Obtém um valor que indica se o módulo de autenticação dá suporte a pré-autenticação.

public:
 property bool CanPreAuthenticate { bool get(); };
public bool CanPreAuthenticate { get; }
member this.CanPreAuthenticate : bool
Public ReadOnly Property CanPreAuthenticate As Boolean

Valor da propriedade

true se o módulo de autorização der suporte à pré-autenticação; caso contrário false, .

Exemplos

O exemplo a seguir mostra como usar a CanPreAuthenticate propriedade . Para obter um exemplo completo, consulte a AuthenticationManager classe .

// Define the authentication type. This type is then used to identify this
// custom authentication module. The default is set to Basic.
public string AuthenticationType { get; } = "Basic";

// Define the pre-authentication capabilities for the module. The default is set
// to false.
public bool CanPreAuthenticate { get; }
Private m_authenticationType As String
Private m_canPreAuthenticate As Boolean


' The CustomBasic constructor initializes the properties of the customized 
' authentication.
Public Sub New()
  m_authenticationType = "Basic"
  m_canPreAuthenticate = False
End Sub

' Define the authentication type. This type is then used to identify this
' custom authentication module. The default is set to Basic.

Public ReadOnly Property AuthenticationType() As String _
 Implements IAuthenticationModule.AuthenticationType

  Get
    Return m_authenticationType
  End Get
End Property

' Define the pre-authentication capabilities for the module. The default is set
' to false.

Public ReadOnly Property CanPreAuthenticate() As Boolean _
 Implements IAuthenticationModule.CanPreAuthenticate


  Get
    Return m_canPreAuthenticate
  End Get
End Property

Comentários

A CanPreAuthenticate propriedade é definida como true para indicar que o módulo de autenticação pode responder com uma instância válida Authorization quando o PreAuthenticate método é chamado.

Notas aos Implementadores

Normalmente, esse é um valor fixo; O módulo de autenticação pode pré-autenticar ou não pode.

Aplica-se a