IAuthenticationModule.CanPreAuthenticate Proprietà

Definizione

Recupera un valore che indica se il modulo di autenticazione supporta la preautenticazione.Gets a value indicating whether the authentication module supports preauthentication.

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

Valore della proprietà

true se il modulo di autorizzazione supporta la preautenticazione. In caso contrario, false.true if the authorization module supports preauthentication; otherwise false.

Esempi

Nell'esempio seguente viene illustrato come utilizzare la proprietà CanPreAuthenticate.The following example shows how to use the CanPreAuthenticate property. Per un esempio completo, vedere la AuthenticationManager classe.For a complete example refer to the AuthenticationManager class.

   String^ m_authenticationType;
   bool m_canPreAuthenticate;

public:

   // The CustomBasic constructor initializes the properties of the customized
   // authentication.
   CustomBasic()
   {
      m_authenticationType = "Basic";
      m_canPreAuthenticate = false;
   }


   property String^ AuthenticationType 
   {

      // Define the authentication type. This type is then used to identify this
      // custom authentication module. The default is set to Basic.
      virtual String^ get()
      {
         return m_authenticationType;
      }

   }

   property bool CanPreAuthenticate 
   {

      // Define the pre-authentication capabilities for the module. The default is set
      // to false.
      virtual bool get()
      {
         return m_canPreAuthenticate;
      }

   }

private string m_authenticationType ;
private bool m_canPreAuthenticate ;

// The CustomBasic constructor initializes the properties of the customized 
// authentication.
public CustomBasic()
{
  m_authenticationType = "Basic";
  m_canPreAuthenticate = false;
}

// 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
  {
    return m_authenticationType;
  }
}

// Define the pre-authentication capabilities for the module. The default is set
// to false.
public bool CanPreAuthenticate
{
  get
  {
    return m_canPreAuthenticate;
  }
}
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

Commenti

La CanPreAuthenticate proprietà è impostata su true per indicare che il modulo di autenticazione può rispondere con un' Authorization istanza valida quando PreAuthenticate viene chiamato il metodo.The CanPreAuthenticate property is set to true to indicate that the authentication module can respond with a valid Authorization instance when the PreAuthenticate method is called.

Note per gli implementatori

Si tratta in genere di un valore fisso. il modulo di autenticazione può preautenticare o non può.This is typically a fixed value; either the authentication module can preauthenticate, or it cannot.

Si applica a