| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_Core.Extensions; |
| | | using WIDESEA_Core.Helper; |
| | | |
| | | namespace WIDESEA_Core.Authorization |
| | |
| | | context.Response.StatusCode = 401; |
| | | context.Response.WriteAsync(new { message = "æææªéè¿", status = false, code = 401 }.Serialize()); |
| | | return Task.CompletedTask; |
| | | } |
| | | }, |
| | | OnMessageReceived = context => |
| | | { |
| | | if (context.HttpContext.IsSuccessSwagger() == true) |
| | | { |
| | | string token = context.HttpContext.GetSuccessSwaggerJwt(); |
| | | if (token.IsNotEmptyOrNull()) |
| | | { |
| | | context.Token = token; |
| | | } |
| | | } |
| | | return Task.CompletedTask; |
| | | }, |
| | | }; |
| | | }); |
| | | |