共用方式為


IAuthenticationSchemeProvider.TryAddScheme(AuthenticationScheme) 方法

定義

註冊配置 IAuthenticationService 以供 使用。

public:
 virtual bool TryAddScheme(Microsoft::AspNetCore::Authentication::AuthenticationScheme ^ scheme);
public virtual bool TryAddScheme (Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme);
abstract member TryAddScheme : Microsoft.AspNetCore.Authentication.AuthenticationScheme -> bool
override this.TryAddScheme : Microsoft.AspNetCore.Authentication.AuthenticationScheme -> bool
Public Overridable Function TryAddScheme (scheme As AuthenticationScheme) As Boolean

參數

scheme
AuthenticationScheme

配置。

傳回

如果已成功新增配置,則為 true。

適用於