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)

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.

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

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:

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

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.

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

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:

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

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

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: