This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "Logging": { | |
| "LogLevel": { | |
| "Default": "Information", | |
| "Microsoft.AspNetCore": "Warning", | |
| "Microsoft.AspNetCore.Authentication": "Debug", | |
| "Microsoft.AspNetCore.Authorization": "Debug" | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.AspNetCore.Builder; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.AspNetCore.Authentication.JwtBearer; | |
| using Microsoft.IdentityModel.Tokens; | |
| using System.Text; | |
| using Microsoft.AspNetCore.Identity; | |
| using Microsoft.EntityFrameworkCore.Diagnostics; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.IdentityModel.Logging; | |
| public class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| // add it at the beginnning | |
| IdentityModelEventSource.ShowPII = true; | |
| IdentityModelEventSource.LogCompleteSecurityArtifact = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <rewrite> | |
| <outboundRules> | |
| <rule name="Replace RESPONSE_Content_Security_Policy" patternSyntax="ECMAScript" stopProcessing="true"> | |
| <match serverVariable="RESPONSE_Content-Security-Policy" pattern=".*viewfile.*" /> | |
| <action type="Rewrite" value="default-src 'none';" /> | |
| </rule> | |
| </outboundRules> | |
| </rewrite> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [HttpPost] | |
| public async Task<IActionResult> Token(OpenIdConnectRequest request) | |
| { | |
| if (!request.IsPasswordGrantType()) | |
| { | |
| // Return bad request if the request is not for password grant type | |
| return BadRequest(new OpenIdConnectResponse | |
| { | |
| Error = OpenIdConnectConstants.Errors.UnsupportedGrantType, | |
| ErrorDescription = "The specified grant type is not supported." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.AspNetCore.Mvc; | |
| using OpenIddict.Abstractions; | |
| using OpenIddict.Server; | |
| namespace WebApplication12.Controllers | |
| { | |
| [Route("api/[controller]")] | |
| [ApiController] | |
| public class TokenController : ControllerBase | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| builder.WebHost.ConfigureKestrel(options => | |
| { | |
| options.ConfigureHttpsDefaults(httpsOptions => | |
| { | |
| httpsOptions.SslProtocols = System.Security.Authentication.SslProtocols.Tls12; | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| builder.Services.AddBusConsume(config => | |
| { | |
| config.ReceiveEndpoint("your-queue-name", e => | |
| { | |
| e.Consumer<CreateOrderConsumer>(); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.UseEndpoints(endpoints => | |
| { | |
| endpoints.MapControllers(); | |
| // Explicitly allow OPTIONS requests for CORS preflight | |
| endpoints.MapMethods("{*path}", new[] { "OPTIONS" }, async context => | |
| { | |
| context.Response.StatusCode = 200; | |
| await context.Response.CompleteAsync(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public async Task<List<FileNode>> SearchTreeNodesAsync(List<FileNode> nodes, string searchTerm, List<string> debugMessages) | |
| { | |
| debugMessages.Clear(); | |
| debugMessages.Add($"Début de la recherche pour le terme : {searchTerm}"); | |
| if (string.IsNullOrWhiteSpace(searchTerm)) | |
| { | |
| debugMessages.Add("Le terme de recherche est vide, retour de tous les nœuds."); | |
| return nodes; | |
| } |