Spring Boot Security - Users & Roles

Sdílet
Vložit
  • čas přidán 26. 10. 2022
  • Spring Boot Security - Users & Roles
    Linkedin: / teddy-smith-015ba61a3
    Website: www.teddysmith.io
    Github: github.com/teddysmithdev
  • Jak na to + styl

Komentáře • 35

  • @cires-ih4ho
    @cires-ih4ho Před měsícem +7

    Authentication: Who are you?
    Authorization: What can you do?

  • @riddhibhardwaj2746
    @riddhibhardwaj2746 Před 8 měsíci

    Thanks a lot for the content,! For the first time I’m actually able to grasp the content and not just code blindly ! Great explaining and amazing content ! Very helpful

  • @adazejohnson281
    @adazejohnson281 Před rokem +1

    You are the best!!! How did you manage to explain this complex topic in such a way that even a 5-year-old would understand. Amazing!!!

  • @Devivl
    @Devivl Před 3 měsíci

    Thank you so much for the lesson, Teddy.

  • @WhiteWay-tx9qt
    @WhiteWay-tx9qt Před rokem +4

    Bro that's coolest video i've ever seen, i've understood everything even if i'm not nature english speaker. You god of a teaching broooooooo!!!!!!!!

  • @My0ldFr13nd
    @My0ldFr13nd Před měsícem

    Hi. I don't know if you're still reading comments under this series but I've got a question
    You see, I've been working on app that has 2 types of users - employees and clients - that are stored in seperate tables, therefore they are seperate entities and use seperate models. For employees, I was planning to have 2 roles - a normal EMPLOYEE and ADMIN, while every client has a CLIENT role. I don't think it makes much sense to make a triple-join table between employees, clients and roles, so I wanted to ask if there's a way to automatically assign the role CLIENT to any user stored in the clients table, or should I just give in and make a join table with a role column, client column and employee column?

  • @Simple_Code99
    @Simple_Code99 Před rokem

    Thank you sir

  • @yacinehammi3448
    @yacinehammi3448 Před 11 měsíci +1

    did you linked to database already or something to be able to see it in database view layer? cause i don't know if you did that part or just skipped ?

  • @sagarkhatri7972
    @sagarkhatri7972 Před 3 měsíci +1

    this playlist is awesome, I wish you made these tutorials using jdk17 or newer version

    • @TeddySmithDev
      @TeddySmithDev  Před 3 měsíci +2

      I’m prob going to remake this course so be sure to check back later

  • @adedejionigbinde7709
    @adedejionigbinde7709 Před rokem +1

    Hello, this is a really great tutorial! I was wondering if the roles could be an actual field in the User Entity or if is it always better to create a table for the roles

  • @geosystems2106
    @geosystems2106 Před 10 měsíci +1

    Database ?? I am guessing that there was some postgres configuration in the previous series.

  • @kavinkumar6513
    @kavinkumar6513 Před rokem

    But if role has many like it should be string like if user save roles means how to do

  • @mccayl5878
    @mccayl5878 Před 4 měsíci

    Hi, is it better to use enum than class for roles?

  • @MaraGaaming
    @MaraGaaming Před rokem

    Hi Man, great tutorial! I was wondering cuz my teacher said that i can't use fetchType.EAGER in this Set roles but without that, i can't even authorize user in postman with 401 unauthorized, because i think roles for this user are not load. Do you have idea how to replace this EAGER fetch to something different?

    • @TeddySmithDev
      @TeddySmithDev  Před rokem

      You do LAZY and when you need the roles you getRoles() and it will be EAGER when function executes.

  • @Anon-jz7iw
    @Anon-jz7iw Před 3 měsíci +2

    To get a better learning experience, do a 1.25x speed.

  • @travahnetshisaulu3101
    @travahnetshisaulu3101 Před 7 měsíci

    I was struggling to connect my react to spring boot back-end with security, i wish you could make a video about it. i will also try to use the knowledge i gathered here to work it out.

    • @TeddySmithDev
      @TeddySmithDev  Před 7 měsíci

      Gonna take a while but react + spring is def on my list

  • @kamiikazeharch5674
    @kamiikazeharch5674 Před rokem

    let's say that i've been creating two user with the same role (admin), is it correct to have duplicated role in the 'role' table ?

    • @TeddySmithDev
      @TeddySmithDev  Před rokem

      Yes that is major reason for having many to many

  • @user-qi5iu5pl5k
    @user-qi5iu5pl5k Před 8 měsíci

    Can I make some alternative in no SQL database?

  • @TheQuancy
    @TheQuancy Před 9 měsíci

    I wish there was one for a MongoDb database

  • @gosumarti5507
    @gosumarti5507 Před 2 měsíci

    Can we use ENUM for the User's roles instead of creating new classes and tables, wouldn't it be easier or it won't work with the ENUM?

  • @Chris-qg6kc
    @Chris-qg6kc Před 26 dny

    @3:05 You got down with that comment on the "weird thing a friend has going on" in his basement. What could it be? 🤨

    • @TeddySmithDev
      @TeddySmithDev  Před 26 dny

      Some type of grow operation or a clandestine chemistry lab lmaoooo

  • @Anon-jz7iw
    @Anon-jz7iw Před 3 měsíci

    Why is it many to many? Is this because you're saying someone can have more than one role? The admin would have user and admin? Why not just do one to many role. where one user can only have one role. user can have user role. admin can have only admin role.

    • @TeddySmithDev
      @TeddySmithDev  Před 3 měsíci +1

      Many-many is better for infinite combinations of roles. In .NET, roles are one-to-many so you could do it that way, but I don’t think you could have infinite combinations like a many to many since it can only tied to one entity. Also, all I saw in Java security roles were all many to many, so seemed like better choice.

    • @Anon-jz7iw
      @Anon-jz7iw Před 3 měsíci

      @@TeddySmithDev Thank you for answering my question! I've been looking all over as to why this would be the case.

  • @user-qx6zy9df1v
    @user-qx6zy9df1v Před 10 měsíci

    @joincolumn i am getting errors
    cannot be a resolved type