JwtBearerAppBuilderExtensions.UseJwtBearerAuthentication Metodo

Definizione

Overload

UseJwtBearerAuthentication(IApplicationBuilder)
Obsoleti.
Obsoleti.

UseJwtBearerAuthentication è obsoleto. Configurare l'autenticazione JwtBearer con AddAuthentication(). AddJwtBearer in ConfigureServices. Per informazioni dettagliate, vedere https://go.microsoft.com/fwlink/?linkid=845470.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)
Obsoleti.
Obsoleti.

UseJwtBearerAuthentication è obsoleto. Configurare l'autenticazione JwtBearer con AddAuthentication(). AddJwtBearer in ConfigureServices. Per informazioni dettagliate, vedere https://go.microsoft.com/fwlink/?linkid=845470.

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Aggiunge il middleware all'oggetto JwtBearerMiddleware specificato IApplicationBuilder, che abilita le funzionalità di elaborazione dei token bearer. Questo middleware comprende in modo appropriato i token formattati e protetti che vengono visualizzati nell'intestazione della richiesta. Se options.AuthenticationMode è attivo, le attestazioni all'interno del token di connessione vengono aggiunte all'utente IPrincipal della richiesta corrente. Se options.AuthenticationMode è passivo, la richiesta corrente non viene modificata, ma è possibile usare IAuthenticationManager AuthenticationAsync in qualsiasi momento per ottenere le attestazioni dal token di connessione della richiesta. Vedere anche http://tools.ietf.org/html/rfc6749

UseJwtBearerAuthentication(IApplicationBuilder)

Attenzione

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

UseJwtBearerAuthentication è obsoleto. Configurare l'autenticazione JwtBearer con AddAuthentication(). AddJwtBearer in ConfigureServices. Per informazioni dettagliate, vedere 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

Parametri

app
IApplicationBuilder

Oggetto IApplicationBuilder da aggiungere al gestore.

Restituisce

Riferimento a questa istanza dopo il completamento dell'operazione.

Attributi

Si applica a

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Attenzione

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

UseJwtBearerAuthentication è obsoleto. Configurare l'autenticazione JwtBearer con AddAuthentication(). AddJwtBearer in ConfigureServices. Per informazioni dettagliate, vedere 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

Parametri

app
IApplicationBuilder

Oggetto IApplicationBuilder da aggiungere al gestore.

options
JwtBearerOptions

Oggetto JwtBearerOptions che specifica le opzioni per il gestore.

Restituisce

Riferimento a questa istanza dopo il completamento dell'operazione.

Attributi

Si applica a

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

Aggiunge il middleware all'oggetto JwtBearerMiddleware specificato IApplicationBuilder, che abilita le funzionalità di elaborazione dei token bearer. Questo middleware comprende in modo appropriato i token formattati e protetti che vengono visualizzati nell'intestazione della richiesta. Se options.AuthenticationMode è attivo, le attestazioni all'interno del token di connessione vengono aggiunte all'utente IPrincipal della richiesta corrente. Se options.AuthenticationMode è passivo, la richiesta corrente non viene modificata, ma è possibile usare IAuthenticationManager AuthenticationAsync in qualsiasi momento per ottenere le attestazioni dal token di connessione della richiesta. Vedere anche 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

Parametri

app
IApplicationBuilder

Oggetto IApplicationBuilder da aggiungere al middleware.

options
JwtBearerOptions

Oggetto JwtBearerOptions che specifica le opzioni per il middleware.

Restituisce

Riferimento a questa istanza dopo il completamento dell'operazione.

Si applica a