Compartir a través de


JwtBearerAppBuilderExtensions.UseJwtBearerAuthentication Método

Definición

Sobrecargas

UseJwtBearerAuthentication(IApplicationBuilder)
Obsoletos.
Obsoletos.

UseJwtBearerAuthentication está obsoleto. Configure la autenticación JwtBearer con AddAuthentication(). AddJwtBearer en ConfigureServices. Para obtener más información, consulte https://go.microsoft.com/fwlink/?linkid=845470.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)
Obsoletos.
Obsoletos.

UseJwtBearerAuthentication está obsoleto. Configure la autenticación JwtBearer con AddAuthentication(). AddJwtBearer en ConfigureServices. Para obtener más información, consulte https://go.microsoft.com/fwlink/?linkid=845470.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Agrega el JwtBearerMiddleware middleware al especificado IApplicationBuilder, que habilita las funcionalidades de procesamiento de tokens de portador. Este middleware comprende los tokens con formato adecuado y protegidos que aparecen en el encabezado de solicitud. Si Options.AuthenticationMode es Active, las notificaciones dentro del token de portador se agregan al usuario IPrincipal de la solicitud actual. Si Options.AuthenticationMode es Pasivo, la solicitud actual no se modifica, pero se puede usar IAuthenticationManager AuthenticateAsync en cualquier momento para obtener las notificaciones del token de portador de la solicitud. Consulte también http://tools.ietf.org/html/rfc6749

UseJwtBearerAuthentication(IApplicationBuilder)

Source:
JwtBearerAppBuilderExtensions.cs
Source:
JwtBearerAppBuilderExtensions.cs

Precaución

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

UseJwtBearerAuthentication está obsoleto. Configure la autenticación JwtBearer con AddAuthentication(). AddJwtBearer en ConfigureServices. Para obtener más información, consulte 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

Parámetros

app
IApplicationBuilder

al IApplicationBuilder que se va a agregar el controlador.

Devoluciones

Una referencia a esta instancia después de que se haya completado la operación.

Atributos

Se aplica a

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Source:
JwtBearerAppBuilderExtensions.cs
Source:
JwtBearerAppBuilderExtensions.cs

Precaución

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

UseJwtBearerAuthentication está obsoleto. Configure la autenticación JwtBearer con AddAuthentication(). AddJwtBearer en ConfigureServices. Para obtener más información, consulte 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

Parámetros

app
IApplicationBuilder

al IApplicationBuilder que se va a agregar el controlador.

options
JwtBearerOptions

que JwtBearerOptions especifica las opciones del controlador.

Devoluciones

Una referencia a esta instancia después de que se haya completado la operación.

Atributos

Se aplica a

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Agrega el JwtBearerMiddleware middleware al especificado IApplicationBuilder, que habilita las funcionalidades de procesamiento de tokens de portador. Este middleware comprende los tokens con formato adecuado y protegidos que aparecen en el encabezado de solicitud. Si Options.AuthenticationMode es Active, las notificaciones dentro del token de portador se agregan al usuario IPrincipal de la solicitud actual. Si Options.AuthenticationMode es Pasivo, la solicitud actual no se modifica, pero se puede usar IAuthenticationManager AuthenticateAsync en cualquier momento para obtener las notificaciones del token de portador de la solicitud. Consulte también 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

Parámetros

app
IApplicationBuilder

al IApplicationBuilder que se va a agregar el middleware.

options
JwtBearerOptions

que JwtBearerOptions especifica las opciones del middleware.

Devoluciones

Una referencia a esta instancia después de que se haya completado la operación.

Se aplica a