Compartilhar via


JwtBearerAppBuilderExtensions.UseJwtBearerAuthentication Método

Definição

Sobrecargas

UseJwtBearerAuthentication(IApplicationBuilder)
Obsoleto.
Obsoleto.

UseJwtBearerAuthentication está obsoleto. Configurar a autenticação JwtBearer com AddAuthentication(). AddJwtBearer em ConfigureServices. Consulte https://go.microsoft.com/fwlink/?linkid=845470 para obter mais detalhes.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)
Obsoleto.
Obsoleto.

UseJwtBearerAuthentication está obsoleto. Configurar a autenticação JwtBearer com AddAuthentication(). AddJwtBearer em ConfigureServices. Consulte https://go.microsoft.com/fwlink/?linkid=845470 para obter mais detalhes.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Adiciona o JwtBearerMiddleware middleware ao especificado IApplicationBuilder, que habilita os recursos de processamento de token de portador. Esse middleware entende os tokens adequadamente formatados e protegidos que aparecem no cabeçalho da solicitação. Se o Options.AuthenticationMode estiver ativo, as declarações dentro do token de portador serão adicionadas ao Usuário IPrincipal da solicitação atual. Se Options.AuthenticationMode for Passivo, a solicitação atual não será modificada, mas IAuthenticationManager AuthenticateAsync poderá ser usada a qualquer momento para obter as declarações do token de portador da solicitação. Confira também http://tools.ietf.org/html/rfc6749

UseJwtBearerAuthentication(IApplicationBuilder)

Origem:
JwtBearerAppBuilderExtensions.cs
Origem:
JwtBearerAppBuilderExtensions.cs

Cuidado

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. Configurar a autenticação JwtBearer com AddAuthentication(). AddJwtBearer em ConfigureServices. Consulte https://go.microsoft.com/fwlink/?linkid=845470 para obter mais detalhes.

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

O IApplicationBuilder ao qual adicionar o manipulador.

Retornos

Uma referência a essa instância após a operação ter sido concluída.

Atributos

Aplica-se a

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Origem:
JwtBearerAppBuilderExtensions.cs
Origem:
JwtBearerAppBuilderExtensions.cs

Cuidado

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. Configurar a autenticação JwtBearer com AddAuthentication(). AddJwtBearer em ConfigureServices. Consulte https://go.microsoft.com/fwlink/?linkid=845470 para obter mais detalhes.

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

O IApplicationBuilder ao qual adicionar o manipulador.

options
JwtBearerOptions

Um JwtBearerOptions que especifica opções para o manipulador.

Retornos

Uma referência a essa instância após a operação ter sido concluída.

Atributos

Aplica-se a

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Adiciona o JwtBearerMiddleware middleware ao especificado IApplicationBuilder, que habilita os recursos de processamento de token de portador. Esse middleware entende os tokens adequadamente formatados e protegidos que aparecem no cabeçalho da solicitação. Se o Options.AuthenticationMode estiver ativo, as declarações dentro do token de portador serão adicionadas ao Usuário IPrincipal da solicitação atual. Se Options.AuthenticationMode for Passivo, a solicitação atual não será modificada, mas IAuthenticationManager AuthenticateAsync poderá ser usada a qualquer momento para obter as declarações do token de portador da solicitação. Confira também 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

O IApplicationBuilder ao qual adicionar o middleware.

options
JwtBearerOptions

Um JwtBearerOptions que especifica opções para o middleware.

Retornos

Uma referência a essa instância após a operação ter sido concluída.

Aplica-se a