File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Core/Authentication/JwtBearer Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ namespace AbpCompanyName.AbpProjectName.Authentication.JwtBearer
6
6
{
7
7
public static class JwtTokenMiddleware
8
8
{
9
- public static IApplicationBuilder UseJwtTokenMiddleware ( this IApplicationBuilder app )
9
+ public static IApplicationBuilder UseJwtTokenMiddleware ( this IApplicationBuilder app , string schema = JwtBearerDefaults . AuthenticationScheme )
10
10
{
11
11
return app . Use ( async ( ctx , next ) =>
12
12
{
13
13
if ( ctx . User . Identity ? . IsAuthenticated != true )
14
14
{
15
- var result = await ctx . AuthenticateAsync ( JwtBearerDefaults . AuthenticationScheme ) ;
15
+ var result = await ctx . AuthenticateAsync ( schema ) ;
16
16
if ( result . Succeeded && result . Principal != null )
17
17
{
18
18
ctx . User = result . Principal ;
You can’t perform that action at this time.
0 commit comments