Spring Boot 3 + Spring Security + JWT Authentication and Authorisation | RBAC | Rest API Example

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

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

  • @cypcode
    @cypcode  11 месяцев назад

    Guys please do like and subscribe as 80% of views are not subscribed yet, subscribing is free as well as sharing, liking and commenting to motivate us to keep going. Thank you very much for watching

  • @MohsinDhoteghar
    @MohsinDhoteghar 11 месяцев назад

    Hi , your videos are incredibly helpful, can you make a video for the deprecated "JdbcTokenStore" or share a link for the replacement of the same.I have read the spring security 6 guide but was unable to find anything regarding it. It will be really helpful . Thanks

  • @andersontiban5356
    @andersontiban5356 11 месяцев назад

    Nice

  • @ganeshsingh3390
    @ganeshsingh3390 10 месяцев назад

    Hey I am new in Spring. Can you tell me why the jwt.secret stored in application.properties file?? Is it safe to store the secret in properties file. Thankyou!!

    • @lemmestealyomum6563
      @lemmestealyomum6563 9 месяцев назад

      As it was for a tutorial it is okay, but for real world applications do not store secret key in application.properties, it is not secure

    • @lemmestealyomum6563
      @lemmestealyomum6563 9 месяцев назад

      But I am talking from a enterprise project or a companies pov
      For your own projects you can store it anywhere you want

  • @FedericoCabrera-v7s
    @FedericoCabrera-v7s 10 месяцев назад +1

    Where can I find the repo?

    • @cypcode
      @cypcode  10 месяцев назад

      Hi @user-ps5hz6hb5i thank you for checking out the video, please see Git repo: github.com/cypcodestudio/rbacspring

  • @RabiulIslam-lx1uc
    @RabiulIslam-lx1uc 11 месяцев назад

    hardly wait for it with sourch code

    • @cypcode
      @cypcode  11 месяцев назад

      Hi @Rabiullslam-lx1uc thank you for checking out the video, please see Git repo: github.com/cypcodestudio/rbacspring

  • @prathyusha3031
    @prathyusha3031 11 месяцев назад

    hii I am getting header as null what to do for that

    • @cypcode
      @cypcode  11 месяцев назад

      Hi @prathyusha3031 please make sure your Authorisation Type is Bearer Token and you have passed in the token that you received back when you were logging in. Once that is set it should be able to pickup your token and Authenticate correctly

  • @sujitkumar2196
    @sujitkumar2196 11 месяцев назад +1

    Awesome,can you please source code it would be very helpful

    • @cypcode
      @cypcode  11 месяцев назад +1

      Hi @sujitkumar2196 thank you for checking out the video, please see Git repo: github.com/cypcodestudio/rbacspring

    • @sujitkumar2196
      @sujitkumar2196 2 месяца назад

      @@cypcode thanks you so much keep posting this type of video.

  • @DattatrayBharde-v1f
    @DattatrayBharde-v1f 10 месяцев назад +1

    Nice video, but I am getting {
    "sub": "admin",
    "role": [],
    "iss": "rbacspring",
    "exp": 1701690111,
    "iat": 1701672111
    } .. Role is empty.. but I loggedin as Admin. pls give the suggestion.

    • @cypcode
      @cypcode  10 месяцев назад

      Hi @user-er9pc2or6b thatnk you very much for watching the video and for your question. That tells me that spring knows that you are a valid user but on your JWT creation you’re not adding the GrantedAuthorities please confirm where you’re adding that and we can address your issue

    • @gagansharma2794
      @gagansharma2794 9 месяцев назад

      I was also getting the same issue but after debugging further, i found while creating user or registering user that time it's trying to fetch roles from ROLE table but ROLE table is empty. So 1st we have to add Roles in ROLE table then we are good to go.
      I think think concept missed by @cypcode.

  • @luciensikapa6543
    @luciensikapa6543 11 месяцев назад

    nice explanations. Please wold you mind sharing the source code?

    • @cypcode
      @cypcode  11 месяцев назад

      Hi @luciensikapa6543 thank you for checking out the video, please see Git repo: github.com/cypcodestudio/rbacspring

  • @vivekkp-z9o
    @vivekkp-z9o 8 месяцев назад

    Please share repository

    • @cypcode
      @cypcode  8 месяцев назад +1

      Thank you for checking out the video, please see Git repo: github.com/cypcodestudio/rbacspring

  • @PgPbnsn
    @PgPbnsn 9 месяцев назад

    this example completely ignores Spring Security architecture both for authentication and authorization. would not recommend it