次の方法で共有


AuthenticationServiceCollectionExtensions.AddAuthentication メソッド

定義

オーバーロード

AddAuthentication(IServiceCollection)

認証サービスに必要なサービスを登録します。

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

認証サービスに必要なサービスを登録し、 を構成します AuthenticationOptions

AddAuthentication(IServiceCollection, Action<SharedAuthenticationOptions>)
AddAuthentication(IServiceCollection, String)

認証サービスに必要なサービスを登録します。 defaultScheme は、特定のスキームが要求されない場合に既定で使用するスキームの名前を指定します。

AddAuthentication(IServiceCollection)

ソース:
AuthenticationServiceCollectionExtensions.cs
ソース:
AuthenticationServiceCollectionExtensions.cs
ソース:
AuthenticationServiceCollectionExtensions.cs

認証サービスに必要なサービスを登録します。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthentication (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddAuthentication (services As IServiceCollection) As IServiceCollection
<Extension()>
Public Function AddAuthentication (services As IServiceCollection) As AuthenticationBuilder

パラメーター

戻り値

AuthenticationBuilder認証をさらに構成するために使用できる 。

適用対象

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

ソース:
AuthenticationServiceCollectionExtensions.cs
ソース:
AuthenticationServiceCollectionExtensions.cs
ソース:
AuthenticationServiceCollectionExtensions.cs

認証サービスに必要なサービスを登録し、 を構成します AuthenticationOptions

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Authentication.AuthenticationOptions> configureOptions);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Authentication.AuthenticationOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddAuthentication (services As IServiceCollection, configureOptions As Action(Of AuthenticationOptions)) As AuthenticationBuilder

パラメーター

configureOptions
Action<AuthenticationOptions>

を構成 AuthenticationOptionsするデリゲート。

戻り値

AuthenticationBuilder認証をさらに構成するために使用できる 。

適用対象

AddAuthentication(IServiceCollection, Action<SharedAuthenticationOptions>)

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthentication (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions> configureOptions);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAuthentication (services As IServiceCollection, configureOptions As Action(Of SharedAuthenticationOptions)) As IServiceCollection

パラメーター

戻り値

適用対象

AddAuthentication(IServiceCollection, String)

ソース:
AuthenticationServiceCollectionExtensions.cs
ソース:
AuthenticationServiceCollectionExtensions.cs
ソース:
AuthenticationServiceCollectionExtensions.cs

認証サービスに必要なサービスを登録します。 defaultScheme は、特定のスキームが要求されない場合に既定で使用するスキームの名前を指定します。

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string defaultScheme);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddAuthentication (services As IServiceCollection, defaultScheme As String) As AuthenticationBuilder

パラメーター

defaultScheme
String

他のすべてのスキームのフォールバックとして使用される既定のスキーム。

戻り値

AuthenticationBuilder認証をさらに構成するために使用できる 。

適用対象