Bagikan melalui


JwtBearerAppBuilderExtensions.UseJwtBearerAuthentication Metode

Definisi

Overload

UseJwtBearerAuthentication(IApplicationBuilder)
Kedaluwarsa.
Kedaluwarsa.

UseJwtBearerAuthentication sudah usang. Konfigurasikan autentikasi JwtBearer dengan AddAuthentication(). TambahkanJwtBearer di ConfigureServices. Lihat https://go.microsoft.com/fwlink/?linkid=845470 untuk detail selengkapnya.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)
Kedaluwarsa.
Kedaluwarsa.

UseJwtBearerAuthentication sudah usang. Konfigurasikan autentikasi JwtBearer dengan AddAuthentication(). TambahkanJwtBearer di ConfigureServices. Lihat https://go.microsoft.com/fwlink/?linkid=845470 untuk detail selengkapnya.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Menambahkan middleware JwtBearerMiddleware ke IApplicationBuilderyang ditentukan , yang memungkinkan kemampuan pemrosesan token Pembawa. Middleware ini memahami token yang diformat dan diamankan dengan tepat yang muncul di header permintaan. Jika Options.AuthenticationMode Aktif, klaim dalam token pembawa ditambahkan ke Pengguna IPrincipal permintaan saat ini. Jika Options.AuthenticationMode pasif, permintaan saat ini tidak dimodifikasi, tetapi IAuthenticationManager AuthenticateAsync dapat digunakan kapan saja untuk mendapatkan klaim dari token pembawa permintaan. Lihat juga http://tools.ietf.org/html/rfc6749

UseJwtBearerAuthentication(IApplicationBuilder)

Sumber:
JwtBearerAppBuilderExtensions.cs
Sumber:
JwtBearerAppBuilderExtensions.cs

Perhatian

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

UseJwtBearerAuthentication sudah usang. Konfigurasikan autentikasi JwtBearer dengan AddAuthentication(). TambahkanJwtBearer di ConfigureServices. Lihat https://go.microsoft.com/fwlink/?linkid=845470 untuk detail selengkapnya.

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

IApplicationBuilder untuk menambahkan handler.

Mengembalikan

Referensi ke instans ini setelah operasi selesai.

Atribut

Berlaku untuk

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Sumber:
JwtBearerAppBuilderExtensions.cs
Sumber:
JwtBearerAppBuilderExtensions.cs

Perhatian

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

UseJwtBearerAuthentication sudah usang. Konfigurasikan autentikasi JwtBearer dengan AddAuthentication(). TambahkanJwtBearer di ConfigureServices. Lihat https://go.microsoft.com/fwlink/?linkid=845470 untuk detail selengkapnya.

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

IApplicationBuilder untuk menambahkan handler.

options
JwtBearerOptions

JwtBearerOptions yang menentukan opsi untuk handler.

Mengembalikan

Referensi ke instans ini setelah operasi selesai.

Atribut

Berlaku untuk

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Menambahkan middleware JwtBearerMiddleware ke IApplicationBuilderyang ditentukan , yang memungkinkan kemampuan pemrosesan token Pembawa. Middleware ini memahami token yang diformat dan diamankan dengan tepat yang muncul di header permintaan. Jika Options.AuthenticationMode Aktif, klaim dalam token pembawa ditambahkan ke Pengguna IPrincipal permintaan saat ini. Jika Options.AuthenticationMode pasif, permintaan saat ini tidak dimodifikasi, tetapi IAuthenticationManager AuthenticateAsync dapat digunakan kapan saja untuk mendapatkan klaim dari token pembawa permintaan. Lihat juga 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

IApplicationBuilder untuk menambahkan middleware.

options
JwtBearerOptions

JwtBearerOptions yang menentukan opsi untuk middleware.

Mengembalikan

Referensi ke instans ini setelah operasi selesai.

Berlaku untuk