Giter Site home page Giter Site logo

luz-inga's Introduction

luz-inga's People

Contributors

pedrohenriquebr avatar

Watchers

 avatar

luz-inga's Issues

Add JWT

example of code

    private void ConfigureAuthService(IServiceCollection services)
    {
        // prevent from mapping "sub" claim to nameidentifier.
        JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Remove("sub");

        var identityUrl = Configuration.GetValue<string>("IdentityUrl");

        services.AddAuthentication("Bearer").AddJwtBearer(options =>
        {
            options.Authority = identityUrl;
            options.RequireHttpsMetadata = false;
            options.Audience = "orders.signalrhub";
            options.TokenValidationParameters.ValidateAudience = false;
            options.Events = new JwtBearerEvents
            {
                OnMessageReceived = context =>
                {
                    var accessToken = context.Request.Query["access_token"];

                    var path = context.HttpContext.Request.Path;
                    if (!string.IsNullOrEmpty(accessToken) && (path.StartsWithSegments("/hub/notificationhub")))
                    {
                        context.Token = accessToken;
                    }
                    return Task.CompletedTask;
                }
            };
        });
        services.AddAuthorization(options =>
        {
            options.AddPolicy("ApiScope", policy =>
            {
                policy.RequireAuthenticatedUser();
                policy.RequireClaim("scope", "orders.signalrhub");
            });
        });
    }
    

Infrastructure dependencies

Bankend:

  • ValidationBehavior (FluentValidation)
  • Global ExceptionBinder
  • Command idempotency
  • Session On Redis
  • SignalR
  • UnitOfWorkDecorator for DomainEventHandlers(INotification) with Scrutor
  • Dapper
  • UnitOfWorkBehavior
  • #3
  • EF Migrations
  • RateLimiter for specific routes: use Redis for counter
  • Configure Hangfire for queues
  • Configure Redis: use List
    • simple queue for email delivery of newsletter
    • simple event queue for commands execution
  • Configure Coravel pro for background jobs
  • Configure Keycloak for IAM keycloack guid
  • Install Polly for Retry and CircuitBreaker Usando .net + Polly
  • Configure message broker with Rabbitmq
  • Install MongoDB for products storage

Frontend:

Monitoring:

  • Elasticsearch
    • Logstash
    • Kibana
    • Healthcheck

Devops

  • Docker
  • Kubernetes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.