JwtBearerAppBuilderExtensions.UseJwtBearerAuthentication Metoda

Definice

Přetížení

UseJwtBearerAuthentication(IApplicationBuilder)
Zastaralé.
Zastaralé.

UseJwtBearerAuthentication je zastaralé. Nakonfigurujte ověřování JwtBearer pomocí AddAuthentication(). V části ConfigureServices přidejteJwtBearer. Další podrobnosti najdete https://go.microsoft.com/fwlink/?linkid=845470 v tématu .

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)
Zastaralé.
Zastaralé.

UseJwtBearerAuthentication je zastaralé. Nakonfigurujte ověřování JwtBearer pomocí AddAuthentication(). V části ConfigureServices přidejteJwtBearer. Další podrobnosti najdete https://go.microsoft.com/fwlink/?linkid=845470 v tématu .

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

JwtBearerMiddleware Přidá middleware do zadaného IApplicationBuilderobjektu , který povolí možnosti zpracování nosných tokenů. Tento middleware rozumí správně formátovaným a zabezpečeným tokenům, které se zobrazují v hlavičce požadavku. Pokud je Options.AuthenticationMode aktivní, deklarace identity v nosné tokenu se přidají do uživatele IPrincipal aktuálního požadavku. Pokud je Options.AuthenticationMode pasivní, aktuální požadavek se nezmění, ale IAuthenticationManager AuthenticateAsync lze kdykoli použít k získání deklarací identity z nosný token požadavku. Viz také http://tools.ietf.org/html/rfc6749

UseJwtBearerAuthentication(IApplicationBuilder)

Zdroj:
JwtBearerAppBuilderExtensions.cs
Zdroj:
JwtBearerAppBuilderExtensions.cs

Upozornění

UseJwtBearerAuthentication is obsolete. Configure JwtBearer authentication with AddAuthentication().AddJwtBearer in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.

UseJwtBearerAuthentication je zastaralé. Nakonfigurujte ověřování JwtBearer pomocí AddAuthentication(). V části ConfigureServices přidejteJwtBearer. Další podrobnosti najdete https://go.microsoft.com/fwlink/?linkid=845470 v tématu .

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseJwtBearerAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("UseJwtBearerAuthentication is obsolete. Configure JwtBearer authentication with AddAuthentication().AddJwtBearer in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseJwtBearerAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)>]
static member UseJwtBearerAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("UseJwtBearerAuthentication is obsolete. Configure JwtBearer authentication with AddAuthentication().AddJwtBearer in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)>]
static member UseJwtBearerAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseJwtBearerAuthentication (app As IApplicationBuilder) As IApplicationBuilder

Parametry

app
IApplicationBuilder

Chcete-li IApplicationBuilder přidat obslužnou rutinu do.

Návraty

Odkaz na tuto instanci po dokončení operace.

Atributy

Platí pro

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Zdroj:
JwtBearerAppBuilderExtensions.cs
Zdroj:
JwtBearerAppBuilderExtensions.cs

Upozornění

UseJwtBearerAuthentication is obsolete. Configure JwtBearer authentication with AddAuthentication().AddJwtBearer in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.

UseJwtBearerAuthentication je zastaralé. Nakonfigurujte ověřování JwtBearer pomocí AddAuthentication(). V části ConfigureServices přidejteJwtBearer. Další podrobnosti najdete https://go.microsoft.com/fwlink/?linkid=845470 v tématu .

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseJwtBearerAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Authentication::JwtBearer::JwtBearerOptions ^ options);
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions options);
[System.Obsolete("UseJwtBearerAuthentication is obsolete. Configure JwtBearer authentication with AddAuthentication().AddJwtBearer in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions options);
[<System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)>]
static member UseJwtBearerAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("UseJwtBearerAuthentication is obsolete. Configure JwtBearer authentication with AddAuthentication().AddJwtBearer in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)>]
static member UseJwtBearerAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseJwtBearerAuthentication (app As IApplicationBuilder, options As JwtBearerOptions) As IApplicationBuilder

Parametry

app
IApplicationBuilder

Chcete-li IApplicationBuilder přidat obslužnou rutinu do.

options
JwtBearerOptions

A JwtBearerOptions , který určuje možnosti pro obslužnou rutinu.

Návraty

Odkaz na tuto instanci po dokončení operace.

Atributy

Platí pro

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

JwtBearerMiddleware Přidá middleware do zadaného IApplicationBuilderobjektu , který povolí možnosti zpracování nosných tokenů. Tento middleware rozumí správně formátovaným a zabezpečeným tokenům, které se zobrazují v hlavičce požadavku. Pokud je Options.AuthenticationMode aktivní, deklarace identity v nosné tokenu se přidají do uživatele IPrincipal aktuálního požadavku. Pokud je Options.AuthenticationMode pasivní, aktuální požadavek se nezmění, ale IAuthenticationManager AuthenticateAsync lze kdykoli použít k získání deklarací identity z nosný token požadavku. Viz také http://tools.ietf.org/html/rfc6749

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseJwtBearerAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::JwtBearerOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.JwtBearerOptions options);
static member UseJwtBearerAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.JwtBearerOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseJwtBearerAuthentication (app As IApplicationBuilder, options As JwtBearerOptions) As IApplicationBuilder

Parametry

app
IApplicationBuilder

K IApplicationBuilder přidání middlewaru.

options
JwtBearerOptions

A JwtBearerOptions , který určuje možnosti pro middleware.

Návraty

Odkaz na tuto instanci po dokončení operace.

Platí pro