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
66{
77 public static class JwtTokenMiddleware
88 {
9- public static IApplicationBuilder UseJwtTokenMiddleware ( this IApplicationBuilder app )
9+ public static IApplicationBuilder UseJwtTokenMiddleware ( this IApplicationBuilder app , string schema = JwtBearerDefaults . AuthenticationScheme )
1010 {
1111 return app . Use ( async ( ctx , next ) =>
1212 {
1313 if ( ctx . User . Identity ? . IsAuthenticated != true )
1414 {
15- var result = await ctx . AuthenticateAsync ( JwtBearerDefaults . AuthenticationScheme ) ;
15+ var result = await ctx . AuthenticateAsync ( schema ) ;
1616 if ( result . Succeeded && result . Principal != null )
1717 {
1818 ctx . User = result . Principal ;
You can’t perform that action at this time.
0 commit comments