IAuthenticationModule.CanPreAuthenticate 屬性

定義

取得值,指出驗證模組是否支援預先驗證。

public bool CanPreAuthenticate { get; }

屬性值

如果授權模組支援預先驗證,則為 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; }

備註

屬性CanPreAuthenticate設定為 true ,表示呼叫 方法時PreAuthenticate,驗證模組可以使用有效的Authorization實例回應。

給實施者的注意事項

這通常是固定值;驗證模組可以預先驗證,或無法驗證。

適用於

產品 版本
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1