Step by Step Tutorial - Authenticating to a REST API in c#

Поділитися
Вставка
  • Опубліковано 5 вер 2024
  • This video follows on from the C# REST Client tutorial to include 2 authentication types: Basic and NTLM (Windows), using a custom headers as well as the NetworkCredential class
    Read the step-by-step tutorial here: dotnetplaybook...
    - My Book: www.apress.com...
    GEAR
    ----
    I created this video using all the following gear, (which I paid for myself!):
    - My Camera: amzn.to/2W4ULRc
    - Wide Angle Lens: amzn.to/2FfEDGK
    - USB3 Docking Station: amzn.to/2T7T2IY
    - Memory Cards:amzn.to/2TKVLxf
    - Lavalier Mic: amzn.to/2FcfdbM
    - Video Editing: amzn.to/2FhKL1j
    - Productivity: amzn.to/2Ckywza
    Note: I may receive a small commission if you choose to buy something from Amazon after clicking any of the links above.

КОМЕНТАРІ • 71

  • @kinstray
    @kinstray 2 роки тому

    Wow! What a pleasure to watch a tutorial in my native language! Will definitely take a look at your other videos. Thanks from Scotland!

  • @danalcock8032
    @danalcock8032 5 років тому +6

    Your videos are excellent. I have watched 2 of them now and about to watch #3 (Deserializing JSON...). Your presentation style suits this type of learning perfectly. Thanks so much for your videos.

    • @binarythistle
      @binarythistle  5 років тому

      Hey Dan, My pleasure! Love hearing that people find them useful! Cheers, Les

  • @vladeb1104
    @vladeb1104 3 роки тому

    It wasn't easy to get IIS Windows Authentication under windows 10 home, but luckily, I managed it. You have touched subjects that I've never seen before, like attaching apps to the IIS or ISS available workaround. Thanks for enlarging my knowledge in those areas.

  • @omostan
    @omostan 3 роки тому +1

    Awesome! Thanks Les. I learned alot. Super explanatory descriptions of the steps as you type the code. I like typing along too and the pace was excellent. Well done!

  • @netsurfers9357
    @netsurfers9357 3 роки тому

    Knowledge not used is dead!... And we that are alive have opportunity! Love you brother!

  • @rakeshchauhan-op8qw
    @rakeshchauhan-op8qw 3 роки тому

    Was watching your videos. All seem to be good. Your newer videos are way better. Good work Les

  • @adnanbutt523
    @adnanbutt523 5 років тому +1

    you are the best. your way of teaching is really nice. May Allah give you more knowledge and best of health

    • @binarythistle
      @binarythistle  5 років тому

      Hi Adnan - lovely words - made my day! Cheers, Les

  • @gavinbeang
    @gavinbeang 4 роки тому

    What a fantastic tutorial, I have been battling with trying to authenticate to Jira and this has solved my problem. Thank you

  • @arnavaggarwal6736
    @arnavaggarwal6736 7 років тому

    this was a great tutorial. I was more interested in the JIRA stuff as I was completely lost as to how to connect to JIRA's API.
    A suggestion for future videos: Would be great to start getting into the POST method. Especially one where you POST information to a JIRA Ticket.
    Another suggestion: If you are going to talk about JIRA, please mention it in the details or titles. I have been looking for a C# and JIRA tutorial like yours for about 3 days and just happened to find this one. Just a tip for thought for anyone searching stuff like "JIRA API C# "
    Regardless, it was a very informative video. Thanks

    • @binarythistle
      @binarythistle  7 років тому

      Hi Arnav, thanks for the feedback. I'mjust finishing up a video on working with JSON, then off on holiday for a month. When I get back I'm going to do a detailed video on working with Jira which will cover both POSTing and working with the Jira JSON payloads. Good tip on making sure the title has the relevant detail - noted!

    • @arnavaggarwal6736
      @arnavaggarwal6736 7 років тому

      binarythistle that sounds great. Just wondering, could you point me in the right direction as to how to update an issue status with the Jira API? I'm working on this project and kind of spending too much time wrapping my head around it all. I'm new to C#

  • @mmaranta785
    @mmaranta785 3 роки тому

    You’re videos are great. I wish you would make more.

  • @rosieshiels7500
    @rosieshiels7500 3 роки тому

    Excellent video Les. Learnt loads. I have no suggestions for improvement like you asked.

  • @mosialive
    @mosialive 5 років тому +1

    Nice On Les! Really appreciate it Buddy!

  • @hugohinsel
    @hugohinsel 7 років тому +1

    GREAT! Thank you spending so much time for us!

    • @binarythistle
      @binarythistle  7 років тому +2

      Hey Hugo - thanks for the feedback, it's my pleasure! I enjoy making the videos anyway, and if people find them useful that's even better! Cheers

  • @lawnself6110
    @lawnself6110 3 роки тому

    Please do a tutorial on how to obtain a session ID and store it for use

  • @TheJolyonSpencer
    @TheJolyonSpencer 4 роки тому

    Thanks for sharing your knowledge.

  • @juanzavala3884
    @juanzavala3884 7 років тому +3

    thank you for share, I am learning a lot, could you please add some sample with a POST, PUT and DELETE options.

    • @binarythistle
      @binarythistle  7 років тому

      Cool glad you're getting stuff out of my tutorials! I'm on holiday at the moment, (gone back to Scotland!), but will be back in Australia in a few weeks, was planning an extended tutorial on POST, PUT etc. So stay tuned! Again thanks for the feedback.

  • @petersonvictor6172
    @petersonvictor6172 6 років тому +1

    Dude, your video is amazing. Thank you.

  • @JorgeMarquezRave
    @JorgeMarquezRave 6 років тому

    Clean and easy to follow, thanks and keep it up!

  • @maxalbrecht9913
    @maxalbrecht9913 6 років тому +2

    Hi, this has been really helpful so far. Would you have any recommendations on how to connect to a server that uses a certificate instead of basic authorization?

  • @erhanmusician
    @erhanmusician 4 роки тому +1

    Thanks

  • @BrianEHo
    @BrianEHo 6 років тому

    Very nice step by step tutorial. Is it possible to leverage an OAuth 2.0 token based authenticating to call external Web API service provider in a console app without clicking the GET/POST button? The console app would allow us to schedule the program execution at a certain time without human intervention. So far, I have not found one yet. Thanks again!

  • @patyue5012
    @patyue5012 2 роки тому

    I wonder was this tutorial using async/await in it? Thank you.

  • @pinakidas397
    @pinakidas397 4 роки тому

    Les how is the compensation part for core C# in Scotland? After 10 years in C# I shifted to D365 and Azure for better pay - this is in Canada and USA. I am currently in Tennessee but did spend quite some time in Toronto.

  • @brianvkn
    @brianvkn 4 роки тому

    Thank a lot for your videos! I am new to C# coding. I wonder if it is possible to download your sample source code used in this video. It is really appreciated!

  • @fanzfanzilla
    @fanzfanzilla 4 роки тому

    Thanks for the video. How would client certification (especially from the smartCard) authentication will work with IIS?

  • @raydevereaux8957
    @raydevereaux8957 3 роки тому

    looking for an oauth2 authentication. is that something you have done? thx

  • @shivakanthkoduru6933
    @shivakanthkoduru6933 6 років тому

    Thank you for video, it help very much.

  • @philpham8712
    @philpham8712 3 роки тому

    Hi-5 Les! Just curious whether we can parse the username and password at Rest to do further authentication i.e. against the db I am thinking parse out the username and pwd to do further auth. inside Get() action method. Thx Les. Great work!
    [Authorize(Users = "")]
    public class LoginController : ApiController
    {
    // GET api/values
    public IEnumerable Get()
    {
    return new string[] { "value1", "value2" };
    }
    }

  • @hudongwang7550
    @hudongwang7550 3 роки тому

    Great tutorial. If you can teach Jira a little bit more will be better. I don't have Jira, so I can't follow all the steps in the video.

  • @ThisCanNotBTheFuture
    @ThisCanNotBTheFuture 7 років тому

    Excellent tutorial. Very patient and detailed, as a tutorial should be.
    Is it possible to leverage what's here (more or less) to do the following: authenticate a request for a token from a third-party REST service token endpoint; and then, using that token, pass a business object to the third-party's web app url so that the fields of said business object automatically populate the textboxes of the third-party form? I need to implement something along those lines in a Silverlight app. I hear WebClient or WebRequest may be better in such a case (as opposed to HttpWebRequest) but I have no idea really. Thanks!

    • @binarythistle
      @binarythistle  7 років тому +1

      Thanks for the feedback. I may do some more authentication stuff in the near future - s0 stay tuned!

  • @mraravind1111
    @mraravind1111 4 роки тому

    Can I see the debugOutput method.

  • @andndre
    @andndre 3 роки тому +1

    Is this works in Xamarin.forms?

  • @gustavoramirezaristizabal2679
    @gustavoramirezaristizabal2679 6 років тому

    Muchas Gracias desde Colombia

    • @binarythistle
      @binarythistle  6 років тому

      Thanks Gustavo - greetings from Australia!

  • @salvadorchilaca9542
    @salvadorchilaca9542 4 роки тому

    how can i to use encryption AES?

  • @stevenkjames
    @stevenkjames 2 роки тому

    Cool

  • @hocvayeu
    @hocvayeu 4 роки тому

    Sir, wellcome to Vietnam

  • @fredcheung7468
    @fredcheung7468 6 років тому

    Greetings. Thanks for your video. It was very useful. Can you also add some sample for using Token Authentication? Thanks :)

  • @yarol2137
    @yarol2137 6 років тому

    Can you do it on win10 home, since it doesn't have windows authentication tool?

  • @pedroavelarramos5210
    @pedroavelarramos5210 4 роки тому

    Hey, I've a quest. Where debugOutput is? Can't find it, and my code is missing it

    • @binarythistle
      @binarythistle  4 роки тому

      Hi Pedro, been a while since I did this video, so can't remembe if I showed the code. You can find an example of it here though on GitHub: github.com/binarythistle/VP-0-REST-Client/blob/master/restClient_0/Form1.cs you may need to change some of the values for the text boxes etc.

  • @lawlerfish12
    @lawlerfish12 5 років тому

    So I’m following along but when I run my program I get WAY more then just the json back. Is there something I missed or need to add?

    • @binarythistle
      @binarythistle  5 років тому

      Hey there what API are you using? Can you provide a small sample of the output?

  • @Animated-Corporate-Videos
    @Animated-Corporate-Videos 6 років тому

    Hi sir,
    thanks for sharing... sir I have a VB.NET Windows Application and I want to connect with Firebase database is it possible if yes please tell me how I can.
    Thanks In advance

  • @maucada
    @maucada 5 років тому

    Do you have the code of this project in some download link? Excelent Work!

  • @alfredocancio712
    @alfredocancio712 5 років тому

    I'am requesting. please make a video how to use REST API firebiase using vb.net . please . thanks alot

  • @RayPJenkins
    @RayPJenkins 5 років тому

    When I try localhost: I get error - Authorization has been denied for this request.

    • @filip7366
      @filip7366 3 роки тому

      xieee hua pua piao

  • @racktheblackman
    @racktheblackman 6 років тому

    Can this code work on OAuth 1.0 authentication type?

  • @yasserzaid5068
    @yasserzaid5068 3 роки тому

    thank you but can you please upload source code

  • @alfredocancio712
    @alfredocancio712 5 років тому

    would you please create a tut REST API in vb.net? pls pls

  • @IMateme
    @IMateme 5 років тому

    The code returns 401, what is wrong?

    • @binarythistle
      @binarythistle  5 років тому

      That's a http 401 - unauthorised response. Could be many things wrong... To eliminate any errors in the code - try using something like "Postman" : (www.getpostman.com/downloads/) to test your API with the same credentials. If you still get 401 then it's not the code and something else, (e.g. wrong username and password). If that works then may be something in the code... I'd need to see what you'd written and have access to the API to help further though. Cheers, Les

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

    Code?

  • @jaguarpaw1638
    @jaguarpaw1638 5 років тому

    Scotland

  • @Robinlan
    @Robinlan 4 роки тому +1

    Hello, Love your videos. Is it possible to contact you via email and phone? I have some specific questions. Thank you!

    • @binarythistle
      @binarythistle  4 роки тому

      Thanks Robin. Pop over to dotnetplaybook.com and my email is on there. Typically though I don't really have the time for detailed answers to questions just to give you a heads up - although I do try.