IAuthenticationModule.CanPreAuthenticate 属性

定义

获取一个值,该值指示身份验证模块是否支持预身份验证。

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

属性值

如果授权模块支持预身份验证,则为 true;否则为 false

示例

下面的示例演示如何使用 CanPreAuthenticate 属性。 有关完整示例, AuthenticationManager 请参阅 类。

// 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

注解

属性CanPreAuthenticate设置为 以true指示身份验证模块可以在调用 方法时PreAuthenticate使用有效Authorization实例进行响应。

实施者说明

这通常是一个固定值;身份验证模块可以预身份验证,或者不能。

适用于