Export (0) Print
Expand All

IAuthenticationModule.CanPreAuthenticate Property

Gets a value indicating whether the authentication module supports preauthentication.

[Visual Basic]
ReadOnly Property CanPreAuthenticate As Boolean
[C#]
bool CanPreAuthenticate {get;}
[C++]
__property bool get_CanPreAuthenticate();
[JScript]
function get CanPreAuthenticate() : Boolean;

Property Value

true if the authorization module supports preauthentication; otherwise false.

Remarks

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.

Notes to Implementers:  This is typically a fixed value; either the authentication module can preauthenticate, or it cannot.

Example

[Visual Basic, C#, C++] The following example shows how to use the CanPreAuthenticate property. For a complete example refer to the AuthenticationManager class.

[Visual Basic] 
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 'New

' 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


[C#] 
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;
  }
}

[C++] 
private:
   String* m_authenticationType;
   bool m_canPreAuthenticate;

   // The CustomBasic constructor initializes the properties of the customized
   // authentication.
public:
   CustomBasic() {
      m_authenticationType = S"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.
   __property String* get_AuthenticationType() {
      return m_authenticationType;
   }

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

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

IAuthenticationModule Interface | IAuthenticationModule Members | System.Net Namespace

Show:
© 2014 Microsoft