Master Claims Transformation for Flexible JWT Auth in ASP.NET Core

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024

Комментарии • 43

  • @MilanJovanovicTech
    @MilanJovanovicTech  3 месяца назад +1

    Want to master Clean Architecture? Go here: bit.ly/3PupkOJ
    Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt

  • @baudeejay8592
    @baudeejay8592 3 месяца назад

    Inventory management with redis. I like you with it

  • @HelloWorld-th9vb
    @HelloWorld-th9vb 3 месяца назад

    Great content as always 💯

  • @sunzhang-d9v
    @sunzhang-d9v 3 месяца назад

    Sorry, but what should be stored in Infrastructure and Persistence?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад

      Check here: ruclips.net/video/TQdLgzVk2T8/видео.html

    • @sunzhang-d9v
      @sunzhang-d9v 3 месяца назад

      @@MilanJovanovicTech There was nothing I needed

  • @maacpiash
    @maacpiash 3 месяца назад

    Great video. I just have one question: if I need to access the database in the claims transformation process, where should I do it? In the implementation of IClaimsTransformation interface, or in the permission provider class?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад +1

      It's all the same. I'd put that in a service that I will resolve from the IClaimTransformation impl.

    • @orlandomco
      @orlandomco 3 месяца назад +2

      He stated at 6:28 that you could replace GetSubscription with an API or Database call.

  • @abdulmoiz2086
    @abdulmoiz2086 3 месяца назад

    interesting solution. the problem is that that this only works in a monolith.
    if you have 2 apis 1 .net and 1 python, then this logic will not work here. rather i think permissions should be part of the access token claims. in this way it won't matter what programming language I'm using, I'll be able to extract the permissions from the access token

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад

      Or they can both run the same logic and get the claims? In fact, you can cache the results in a distributed cache so the other API doesn't have to do any work

  • @rusektor
    @rusektor 3 месяца назад

    How does this differ from ClaimsPrincipalFactory?

  • @EvekoShadow
    @EvekoShadow 3 месяца назад

    Does this work well with dynamic claims? Let’s say a CreateOrder Claim but said user can only create them for his department

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад

      I think you'd need to have auth in the use case as well

    • @EvekoShadow
      @EvekoShadow 3 месяца назад

      I would love to have middleware that can consume the first part of a url param to determine authorization… api/{departmentid}/{createorder}, now we have to determine authorization in endpoint itself.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад

      @@EvekoShadow That's resource-based authorization, which is a bit different.

  • @haroldpepete
    @haroldpepete 3 месяца назад

    great video, but in this case the normal user has the same permission than a user with a standard plan, he or she just need to be registered, even tough it was a great concept, you take the CreateScope and GetRequiredSerrvice from my comment?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад

      It's a dummy example... The plan would be fetched from a database, for example.

    • @haroldpepete
      @haroldpepete 3 месяца назад

      @@MilanJovanovicTech ok i got it, great video thank for sharing your knowledge with us, i really appreciate it

  • @vamvdotnet
    @vamvdotnet 3 месяца назад +1

    Excellent video! I learned a lot from you today :)

  • @Cesar-qi2jb
    @Cesar-qi2jb 3 месяца назад

    All your videos are right on time 🤩
    We use Microsoft Entra ID for authentication. However, we plan on building our own access control API and make use of claims transformations. We use Redis as cache.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад

      I think this will be a great fit for your use case. Will you use Roles/Permissions, Policies?

    • @Cesar-qi2jb
      @Cesar-qi2jb 3 месяца назад +1

      @@MilanJovanovicTech Policy-based authorization with permissions.
      Roles and Groups would be managed by our Access Control API.

  • @amaechinaikechukwu8266
    @amaechinaikechukwu8266 3 месяца назад

    I want to know as much as you

  • @10Totti
    @10Totti 3 месяца назад

    Thanks best video!

  • @SamFugarino
    @SamFugarino 3 месяца назад

    Thanks Milan

  • @sunzhang-d9v
    @sunzhang-d9v 3 месяца назад

    我想知道 Infrastructure 和 Presentation 中应该存储哪些内容?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад

      Check this out: ruclips.net/video/TQdLgzVk2T8/видео.html

    • @sunzhang-d9v
      @sunzhang-d9v 3 месяца назад

      @@MilanJovanovicTech Sorry, but what should be stored in Infrastructure and Persistence?

  • @Paul-uo9sv
    @Paul-uo9sv 3 месяца назад

    Good video

  • @RaZziaN1
    @RaZziaN1 3 месяца назад +3

    Really good video, except i dislike minimal api, but other than that great.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 месяца назад

      Thanks. Why do you not like Minimal APIs?

    • @AhmarHusainn
      @AhmarHusainn 3 месяца назад

      Its only about adapting to change😊

    • @rodilife
      @rodilife Месяц назад

      The setup process for using Minimal API in production is tiresome. It's either Controllers or FastEndpoints, one of the best libraries in the ecosystem right now. FastEnpoints is what minimal API’s should have been.