domingo, 8 de outubro de 2023

How to use JWT access_token and refresh_token in ASP.NET (Core) 8

 




sábado, 2 de setembro de 2023

My Smart plug ports

TCP/UDP ports

6600 to 6699

and 

8883

terça-feira, 4 de julho de 2023

ASP.NET Response Compression

 

//public void ConfigureServices(IServiceCollection services)

services.AddResponseCompression(options =>

{

    options.MimeTypes = new[] { "application/json" };

    //options.EnableForHttps = true;

});

// ...

// public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IServiceScopeFactory scopeFactory)

app.UseResponseCompression();


Beware of the security issues when using EnableForHttps .

ASP.NET 8 Rate Limit - AddTokenBucketLimiter

 

builder.Services.AddRateLimiter(o =>

{

    o.AddTokenBucketLimiter("token", y =>

    {

        y.TokenLimit = 100;

        y.QueueProcessingOrder = System.Threading.RateLimiting.QueueProcessingOrder.OldestFirst;

        y.QueueLimit = 5;

        y.ReplenishmentPeriod = TimeSpan.FromSeconds(10);

        y.TokensPerPeriod = 20;

        y.AutoReplenishment = true;

    });

});


Source: https://twitter.com/mjovanovictech/status/1676185657092317187

How to get QueryString in .NET 8 Blazor using [SupplyParameterFromQuery]

To read a query string value, there is the  [Parameter] [SupplyParameterFromQuery]


@page "/"

<span>MyValue: @MyValue</span>

@code 

{

    [Parameter]

    [SupplyParameterFromQuery]

    public string MyValue { get; set; }

}


Source: Weston Walker on Twitter: "TIL in .NET Blazor you can get query strings from the URL and set them to a variable with the [SupplyParameterFromQuery] attribute. I'm finding it super handy for Oauth callback scenarios where you get a code back in the url from a external service. https://t.co/ERvhlQOlC1" / Twitter

segunda-feira, 15 de maio de 2023

WiFi 6 - 802.11ax

WiFi 6 - 802.11ax
WiFi 5 - 802.11ac
WiFi 4 - 802.11n



domingo, 14 de maio de 2023

Authentication in Blazor Server

Authentication in Blazor Server



You're using AuthenticationStateProvider wrong in your Blazor Server app! Let's fix it!