JwtBearerAppBuilderExtensions.UseJwtBearerAuthentication Methode

Definition

Überlädt

UseJwtBearerAuthentication(IApplicationBuilder)
Veraltet.
Veraltet.

UseJwtBearerAuthentication ist veraltet. Konfigurieren Sie die JwtBearer-Authentifizierung mit AddAuthentication(). Fügen SieJwtBearer in ConfigureServices hinzu. Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=845470.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)
Veraltet.
Veraltet.

UseJwtBearerAuthentication ist veraltet. Konfigurieren Sie die JwtBearer-Authentifizierung mit AddAuthentication(). Fügen SieJwtBearer in ConfigureServices hinzu. Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=845470.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Fügt die JwtBearerMiddleware Middleware der angegebenen IApplicationBuilderhinzu, wodurch Bearertokenverarbeitungsfunktionen aktiviert werden. Diese Middleware versteht entsprechend formatierte und gesicherte Token, die im Anforderungsheader angezeigt werden. Wenn Options.AuthenticationMode aktiv ist, werden die Ansprüche innerhalb des Bearertokens dem IPrincipal-Benutzer der aktuellen Anforderung hinzugefügt. Wenn Options.AuthenticationMode passiv ist, wird die aktuelle Anforderung nicht geändert, aber IAuthenticationManager AuthenticateAsync kann jederzeit verwendet werden, um die Ansprüche aus dem Bearertoken der Anforderung abzurufen. Siehe auch http://tools.ietf.org/html/rfc6749

UseJwtBearerAuthentication(IApplicationBuilder)

Quelle:
JwtBearerAppBuilderExtensions.cs
Quelle:
JwtBearerAppBuilderExtensions.cs

Achtung

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

UseJwtBearerAuthentication ist veraltet. Konfigurieren Sie die JwtBearer-Authentifizierung mit AddAuthentication(). Fügen SieJwtBearer in ConfigureServices hinzu. Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=845470.

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
C#
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
C#
[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);

Parameter

app
IApplicationBuilder

Der , IApplicationBuilder dem der Handler hinzugefügt werden soll.

Gibt zurück

Ein Verweis auf diese Instanz, nachdem der Vorgang abgeschlossen ist.

Attribute

Gilt für:

ASP.NET Core 2.2 und andere Versionen
Produkt Versionen (Veraltet)
ASP.NET Core 1.0, 1.1 (2.0, 2.1, 2.2)

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Quelle:
JwtBearerAppBuilderExtensions.cs
Quelle:
JwtBearerAppBuilderExtensions.cs

Achtung

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

UseJwtBearerAuthentication ist veraltet. Konfigurieren Sie die JwtBearer-Authentifizierung mit AddAuthentication(). Fügen SieJwtBearer in ConfigureServices hinzu. Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=845470.

C#
[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);
C#
[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);

Parameter

app
IApplicationBuilder

Der , IApplicationBuilder dem der Handler hinzugefügt werden soll.

options
JwtBearerOptions

Eine JwtBearerOptions , die Optionen für den Handler angibt.

Gibt zurück

Ein Verweis auf diese Instanz, nachdem der Vorgang abgeschlossen ist.

Attribute

Gilt für:

ASP.NET Core 2.2 und andere Versionen
Produkt Versionen (Veraltet)
ASP.NET Core (2.0, 2.1, 2.2)

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Fügt die JwtBearerMiddleware Middleware der angegebenen IApplicationBuilderhinzu, wodurch Bearertokenverarbeitungsfunktionen aktiviert werden. Diese Middleware versteht entsprechend formatierte und gesicherte Token, die im Anforderungsheader angezeigt werden. Wenn Options.AuthenticationMode aktiv ist, werden die Ansprüche innerhalb des Bearertokens dem IPrincipal-Benutzer der aktuellen Anforderung hinzugefügt. Wenn Options.AuthenticationMode passiv ist, wird die aktuelle Anforderung nicht geändert, aber IAuthenticationManager AuthenticateAsync kann jederzeit verwendet werden, um die Ansprüche aus dem Bearertoken der Anforderung abzurufen. Siehe auch http://tools.ietf.org/html/rfc6749

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseJwtBearerAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.JwtBearerOptions options);

Parameter

app
IApplicationBuilder

Der, IApplicationBuilder dem die Middleware hinzugefügt werden soll.

options
JwtBearerOptions

Eine JwtBearerOptions , die Optionen für die Middleware angibt.

Gibt zurück

Ein Verweis auf diese Instanz, nachdem der Vorgang abgeschlossen ist.

Gilt für:

ASP.NET Core 1.1 und ASP.NET Core 1.0
Produkt Versionen
ASP.NET Core 1.0, 1.1