Spring Boot + Spring Security + OAuth2 + JWT from scratch

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • In this video you will learn to implement the OAuth2, JWT, Spring Security from scratch.
    Note: Please referred the pinned comment of mine in comment section to get rid of the yellow cross marks(deprecated) issue.
    ►Checkout my website: www.pixeltrice...
    ►Click here to subscribe : / @pixeltrice
    If my videos have helped you in any way do support PixelTrice to make more content.
    For Donation
    Patreon: / pixeltrice
    About Me:
    Hey Guys, I'm Software Engineer by Profession expertise in Java!!!
    I make free programming tutorials from beginner to advanced level.
    That includes Java for beginner, Advanced Java and many more.
    And i use to explain in a very simple words, even if you are from other background and trying to switch in IT Industry, then you at right place.I give a Real World Example, so that you can easily understand any concept in depth.
    Sometimes I make videos on motivation.
    There is something for everyone here.

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

  • @mohamedgohar1249
    @mohamedgohar1249 3 года назад +2

    goooooooooooooooooooooooooooood goooooooooooooooooooooooooood

  • @PixelTrice
    @PixelTrice  3 года назад +8

    In video at 41:27 duration, I have implemented the OAuth 2.0 Server, But if you watched or going to watch, you will notice that Methods and Classes used in OAuth 2.0 have been deprecated(Yellow- Cross -Marked). This is because Spring Security no longer supporting the Authorization Server (with OAuth 2.0 implementation).
    In order to remove the yellow marked line, just replace the OAuth 2.0 dependency version from 2.5.0.RELEASE to 2.3.3.RELEASE in pom.xml
    Same has been updated in the source code hosted on git. Please refer for better understanding.
    Please if you know any other approach , do share with us. Thanks.

    • @thesealednectar22
      @thesealednectar22 3 года назад +1

      even the jdbc template method has been deprecated

  • @sachintendulkarn291
    @sachintendulkarn291 2 года назад +1

    could you post another video for Oauth2+jwt (without deprecated function) using Google signin.

  • @er.anwarahmadansari5772
    @er.anwarahmadansari5772 2 года назад +2

    I m extremely sorry For u Sir, Lekin Acche logoki Kadar nahi Kisiko. Aaapke Jaise Kisi orne Explain he n kiya Sir, Thank u Soooo much For Ur Great Contribution.

  • @corporatechic2742
    @corporatechic2742 4 месяца назад

    Hello i have go to implement outh not outh 2.0 so are both same ?

  • @athul03
    @athul03 8 месяцев назад

    Where is this post in your web page?

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

    sir please provide me the git link

  • @rupendrajaiswal5747
    @rupendrajaiswal5747 Год назад

    Any one has this code

  • @pankaj25848
    @pankaj25848 3 года назад +1

    The video do not have the explanation for how is it doing the authorization? How the token is used to do the authorization. How it is actually comparing the value that we are setting in db. All that.

  • @girivrc1438
    @girivrc1438 3 года назад +2

    Great tutorial but should have explained in real time like how Authorization working internally

    • @PixelTrice
      @PixelTrice  3 года назад

      Hi Giri, I already explained in another video about how the authorization works internally. Video Link:- ruclips.net/video/6072IdEMYnc/видео.html

  • @yatausao
    @yatausao Год назад

    como lo inegro con angular

  • @BaoNguyen-rh4fi
    @BaoNguyen-rh4fi 3 года назад +1

    how we can logout ?

  • @amremaish137
    @amremaish137 3 года назад +1

    Thank you, would you support the Github repo?

  • @phanimc11211
    @phanimc11211 2 года назад +1

    very detailed explanation . Please keep doing it . Thanks once again.

  • @mariayepez8799
    @mariayepez8799 3 года назад +2

    Acabo de implementar este ejercicio como práctica y realmente funciona! Muchas gracias por la explicación también. Seguiré viendo otros videos.

    • @yeruvanag7006
      @yeruvanag7006 3 года назад +2

      She is from Spanish , translation here : I just implemented this exercise as practice and it really works! Thank you very much for the explanation as well. I will continue to watch other videos

  • @harshalfarkade3917
    @harshalfarkade3917 8 месяцев назад

    can we use mysql database instead of h2database and i"m using spring boot 3.2 .2 verson and new version of 0Auth2 what should be the changes in code . please tell

  • @nikhilahire4002
    @nikhilahire4002 Год назад

    In this video you have not made any packages for controller So, how can controller will be get identified.
    🤔🙄

  • @sureshm6906
    @sureshm6906 4 года назад +1

    Video not playing from 4 minutes. Please check

    • @PixelTrice
      @PixelTrice  4 года назад +2

      Hi Suresh, Thank you for info, please try to refresh and run it again , I cross checked on youtube app and web browsers , it is working perfectly. If you still face the same issue, then please update your youtube application.

  • @Raj-yy3dw
    @Raj-yy3dw 2 года назад

    {
    "error": "invalid_token",
    "error_description": "Cannot convert access token to JSON"
    }
    anyone can provide solution? Thanks in advance

  • @aspaddanki5938
    @aspaddanki5938 6 месяцев назад

    Recently, I came across this channel on RUclips while searching for OAuth videos. The content in this channel is incredibly valuable. It's surprising that it hasn't garnered at least 20k subscribers yet; it's truly underrated. I hope to see more viewership and subscriptions for this channel in the future. However, I noticed that the content seems to have stopped, with the last video posted a year ago. I would like to request the admin to upload more videos like this. It would be particularly helpful to learn how Spring Boot applications can be deployed in AWS, GCP, or Azure.

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

    Hi sir
    How to generate refresh token using same logic.can you please make a video for the same

  • @tolulopeayemobola1446
    @tolulopeayemobola1446 3 года назад +1

    Hi, thank you very much for your video. I am working on something and I found, while following your video, that the annotations @EnableResourceServer and @EnableAuthorizationServer have been deprecated. I read on from some search that as at May, 2020, the Spring team had responded to developers' protests to re-include both annotations into Spring security (they had said to not continue with it in Spring earlier). In the meantime, what are the alternatives, if any, for these deprecated annnocations?

    • @kousikup23
      @kousikup23 3 года назад

      I am also facing this issue
      Please post here if you found any idea

    • @PixelTrice
      @PixelTrice  3 года назад

      Hi Tolulope, please refer the pinned comment on the top of this video, deprecated issue will be solved.

    • @PixelTrice
      @PixelTrice  3 года назад

      @@kousikup23 Hi Kousik, please refer the pinned comment of mine, just I have updated and you can also check same changes from git. I hope deprecated issue will be resolved.

  • @indranilgoswami1500
    @indranilgoswami1500 3 года назад +1

    Thanks a lot , amazing explanation . Please keep doing it . Thanks once again.

  • @integralsoftware5830
    @integralsoftware5830 3 года назад +4

    The best tutorial i have ever followed explaining oauth nightmare so clearly. 1 hour looked like 10mins. Awesome!

  • @nikshayjain5599
    @nikshayjain5599 3 года назад

    @enableaothorizationserver and @enableresourceserver both are dpereceted, any solution?

  • @manognajoshik8465
    @manognajoshik8465 Год назад

    Awesome.. your channel should gain many subscribers

  • @hemanthkumar7942
    @hemanthkumar7942 2 года назад

    How can I generate access-token using this refresh token,which endpoint I have to hit here and what header/params I have to use to generate access token with refresh token

  • @userprod2825
    @userprod2825 3 года назад

    greate tutorial thanks, anyway how can i do refresh token and remoke token using this spring security and oauth2 ?

  • @pushkarkumar4602
    @pushkarkumar4602 3 года назад +1

    Thank you for this. its really very helpful and i am able to work on this. 👏👏

  • @prachisonawane7552
    @prachisonawane7552 3 года назад

    It is showing invalid signature..not working

  • @sanamudash4976
    @sanamudash4976 2 года назад

    is this applicable for micro services

  • @manikantarv9059
    @manikantarv9059 4 года назад +1

    Thanks for the video sir

  • @jyotipaan5408
    @jyotipaan5408 2 года назад

    The best tutorial on Spring Security. Keep making such wonderful videos.👍

  • @temptrue3322
    @temptrue3322 2 года назад

    All the methods are deprecated

  • @tolulopeayemobola1446
    @tolulopeayemobola1446 3 года назад

    Hi. trying the last few minutes of the video, I ran into an error...
    Invalid token error but had it fixed. However, on the jwt.io debugger, it says the token signature has invalid signature. Why is this the case? and how to resolve it?

  • @prernachitransh6791
    @prernachitransh6791 2 года назад

    awesome content 👏🙇‍♀️

  • @bmnaidu8471
    @bmnaidu8471 2 года назад

    nice and excellent 🙏

  • @sg3ddx
    @sg3ddx 3 года назад

    Hello, thank you for the helpful video. I have an important question, how we can logout? how we can revoke jwtToken?

  • @abhisheksarangi3844
    @abhisheksarangi3844 3 года назад

    Nice video

  • @sheejacp9659
    @sheejacp9659 3 года назад

    This tutorial is very nice but can you explain how this jwt token authorization is done?

    • @PixelTrice
      @PixelTrice  3 года назад

      Noted Sheeja, Will explain soon in detailed in very simple approach.

  • @SmartEngineers
    @SmartEngineers 3 года назад

    This is what i was looking for Thankfully! you made my day.

  • @DeepakPatel-xl3tr
    @DeepakPatel-xl3tr Год назад

    Appreciate your work

  • @sagarmandave662
    @sagarmandave662 3 года назад

    Superb explanation sir...

  • @sreenivasanrajendran
    @sreenivasanrajendran 3 года назад

    Really awesome stuff.. thank you so much.

    • @sreenivasanrajendran
      @sreenivasanrajendran 3 года назад

      I have dropped you a mail at admin id. If you reply, it will be so helpful

  • @subramanianchenniappan4059
    @subramanianchenniappan4059 3 года назад

    Thanks

  • @odunayooni5660
    @odunayooni5660 3 года назад +1

    This is a nice tutorial. Thank you for this.
    Can you also help on how to handle the Basic Auth programmatically to generate the access token instead of using postman. Thanks in anticipation.

    • @PixelTrice
      @PixelTrice  3 года назад

      Sorry Odunayo, I didn't get you. Actually token is generated programmatically only, I am using POSTMAN just as Client or Frontend request.

  • @RajeshKumar-rm7cy
    @RajeshKumar-rm7cy 3 года назад +1

    This tutorial is very helpful , every method and annotations are explained in details are really appreciatable. As of now i'm using spring boot 2.4.1 some of the classes and interfaces are deprecated if you provide the solution (i.e) alternate is very much useful. Thanks once again for your great work.

    • @PixelTrice
      @PixelTrice  3 года назад

      Hi Rajesh, did you find any solution to handle deprecated classes and interfaces?? You can try by replacing the OAuth 2.0 dependency with OAuth 2.0 auto-configuration dependency, I have shared the link on top most comment of this video.

  • @BaoNguyen-rh4fi
    @BaoNguyen-rh4fi 3 года назад

    OMG . Thank you very much

  • @vkeyraj19
    @vkeyraj19 3 года назад

    Hi, Are you planning to release tutorial for Springboot Webflux Oauth2 integration?

  • @pclp3202
    @pclp3202 3 года назад

    Just got a chance to see your video, really superb. Only worry is for past few months no videos been uploaded in your channel. Expecting lot from yours vision. Thanks again for the good video sir.