OAuthExtensions.AddOAuth 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddOAuth(AuthenticationBuilder, String, Action<OAuthOptions>) |
使用指定的驗證配置,將 OAuth 2.0 型驗證新增至 AuthenticationBuilder 。 |
AddOAuth(AuthenticationBuilder, String, String, Action<OAuthOptions>) |
使用指定的驗證配置,將 OAuth 2.0 型驗證新增至 AuthenticationBuilder 。 |
AddOAuth<TOptions,THandler>(AuthenticationBuilder, String, Action<TOptions>) |
使用指定的驗證配置,將 OAuth 2.0 型驗證新增至 AuthenticationBuilder 。 |
AddOAuth<TOptions,THandler>(AuthenticationBuilder, String, String, Action<TOptions>) |
使用指定的驗證配置,將 OAuth 2.0 型驗證新增至 AuthenticationBuilder 。 |
AddOAuth(AuthenticationBuilder, String, Action<OAuthOptions>)
使用指定的驗證配置,將 OAuth 2.0 型驗證新增至 AuthenticationBuilder 。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddOAuth (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, Action<Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions> configureOptions);
static member AddOAuth : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * Action<Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddOAuth (builder As AuthenticationBuilder, authenticationScheme As String, configureOptions As Action(Of OAuthOptions)) As AuthenticationBuilder
參數
- authenticationScheme
- String
驗證配置。
- configureOptions
- Action<OAuthOptions>
要設定 OAuthOptions 的委派。
傳回
作業完成之後的 builder
參考。
適用於
AddOAuth(AuthenticationBuilder, String, String, Action<OAuthOptions>)
使用指定的驗證配置,將 OAuth 2.0 型驗證新增至 AuthenticationBuilder 。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddOAuth (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string displayName, Action<Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions> configureOptions);
static member AddOAuth : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * string * Action<Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddOAuth (builder As AuthenticationBuilder, authenticationScheme As String, displayName As String, configureOptions As Action(Of OAuthOptions)) As AuthenticationBuilder
參數
- authenticationScheme
- String
驗證配置。
- displayName
- String
驗證處理常式的顯示名稱。
- configureOptions
- Action<OAuthOptions>
要設定 OAuthOptions 的委派。
傳回
作業完成之後的 builder
參考。
適用於
AddOAuth<TOptions,THandler>(AuthenticationBuilder, String, Action<TOptions>)
使用指定的驗證配置,將 OAuth 2.0 型驗證新增至 AuthenticationBuilder 。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddOAuth<TOptions,THandler> (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, Action<TOptions> configureOptions) where TOptions : Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions, new() where THandler : Microsoft.AspNetCore.Authentication.OAuth.OAuthHandler<TOptions>;
static member AddOAuth : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * Action<'Options (requires 'Options :> Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions and 'Options : (new : unit -> 'Options))> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder (requires 'Options :> Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions and 'Options : (new : unit -> 'Options) and 'Handler :> Microsoft.AspNetCore.Authentication.OAuth.OAuthHandler<'Options>)
<Extension()>
Public Function AddOAuth(Of TOptions As {OAuthOptionsNew}, THandler As {OAuthOptionsNew}) (builder As AuthenticationBuilder, authenticationScheme As String, configureOptions As Action(Of TOptions)) As AuthenticationBuilder
類型參數
- TOptions
- THandler
參數
- authenticationScheme
- String
驗證配置。
- configureOptions
- Action<TOptions>
用來設定處理常式特定選項的委派。
傳回
作業完成之後的 builder
參考。
適用於
AddOAuth<TOptions,THandler>(AuthenticationBuilder, String, String, Action<TOptions>)
使用指定的驗證配置,將 OAuth 2.0 型驗證新增至 AuthenticationBuilder 。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddOAuth<TOptions,THandler> (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string displayName, Action<TOptions> configureOptions) where TOptions : Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions, new() where THandler : Microsoft.AspNetCore.Authentication.OAuth.OAuthHandler<TOptions>;
static member AddOAuth : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * string * Action<'Options (requires 'Options :> Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions and 'Options : (new : unit -> 'Options))> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder (requires 'Options :> Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions and 'Options : (new : unit -> 'Options) and 'Handler :> Microsoft.AspNetCore.Authentication.OAuth.OAuthHandler<'Options>)
<Extension()>
Public Function AddOAuth(Of TOptions As {OAuthOptionsNew}, THandler As {OAuthOptionsNew}) (builder As AuthenticationBuilder, authenticationScheme As String, displayName As String, configureOptions As Action(Of TOptions)) As AuthenticationBuilder
類型參數
- TOptions
- THandler
參數
- authenticationScheme
- String
驗證配置。
- displayName
- String
驗證處理常式的顯示名稱。
- configureOptions
- Action<TOptions>
用來設定處理常式特定選項的委派。
傳回
作業完成之後的 builder
參考。