Spring Boot Security - Users & Roles

Поділитися
Вставка
  • Опубліковано 26 жов 2022
  • Spring Boot Security - Users & Roles
    Linkedin: / teddy-smith-015ba61a3
    Website: www.teddysmith.io
    Github: github.com/teddysmithdev
  • Навчання та стиль

КОМЕНТАРІ • 34

  • @cires-ih4ho
    @cires-ih4ho 2 місяці тому +8

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

  • @adazejohnson281
    @adazejohnson281 Рік тому +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!!!

  • @riddhibhardwaj2746
    @riddhibhardwaj2746 9 місяців тому

    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

  • @bilelbelghith5432
    @bilelbelghith5432 2 дні тому

    I know the principals of roles, permissions but i like how u described it as a house.

  • @WhiteWay-tx9qt
    @WhiteWay-tx9qt Рік тому +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!!!!!!!!

  • @Devivl
    @Devivl 4 місяці тому

    Thank you so much for the lesson, Teddy.

  • @Simple_Code99
    @Simple_Code99 Рік тому

    Thank you sir

  • @Anon-jz7iw
    @Anon-jz7iw 4 місяці тому +2

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

    • @guratete
      @guratete 2 місяці тому

      I do it at 2x

  • @sagarkhatri7972
    @sagarkhatri7972 4 місяці тому +1

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

    • @TeddySmithDev
      @TeddySmithDev  4 місяці тому +2

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

  • @yacinehammi3448
    @yacinehammi3448 Рік тому +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 ?

  • @geosystems2106
    @geosystems2106 11 місяців тому +1

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

  • @My0ldFr13nd
    @My0ldFr13nd 2 місяці тому

    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?

  • @kavinkumar6513
    @kavinkumar6513 Рік тому

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

  • @mccayl5878
    @mccayl5878 5 місяців тому

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

  • @adedejionigbinde7709
    @adedejionigbinde7709 Рік тому +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

  • @TheQuancy
    @TheQuancy 10 місяців тому

    I wish there was one for a MongoDb database

  • @MaraGaaming
    @MaraGaaming Рік тому

    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  Рік тому

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

  • @user-qi5iu5pl5k
    @user-qi5iu5pl5k 9 місяців тому

    Can I make some alternative in no SQL database?

  • @travahnetshisaulu3101
    @travahnetshisaulu3101 8 місяців тому

    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  8 місяців тому

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

  • @kamiikazeharch5674
    @kamiikazeharch5674 Рік тому

    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  Рік тому

      Yes that is major reason for having many to many

  • @gosumarti5507
    @gosumarti5507 3 місяці тому

    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?

    • @TeddySmithDev
      @TeddySmithDev  3 місяці тому

      Sure Enum would actually be better idea

    • @gosumarti5507
      @gosumarti5507 3 місяці тому

      great, thanks!@@TeddySmithDev

  • @Anon-jz7iw
    @Anon-jz7iw 4 місяці тому

    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  4 місяці тому +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 4 місяці тому

      @@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 11 місяців тому

    @joincolumn i am getting errors
    cannot be a resolved type