Closed rjwijnen closed 7 years ago
It's quite simple. Just inject AuthHttp instead of angular Http service and your request will contain the Authorization header. I don't have a public repo to show it, i'm sorry.
regards
Being new to Active Directory and adal, I had a really hard time getting it to work. I think most of my trouble was probably just wrong configuration. I finally got it to work by starting with the working angular 1 example at https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp-dotnet-webapi. I then replaced just the API portion with my own, still using the angular 1 client, and then, once that was working I was able to get an angular 2 app working against it using the same configuration as in the angular 1 example
Indeed it was quite simple and it was my config that was wrong with the endpoints part.. Thanks for the help!
I'm having difficulties on howto use the AuthHttp. Does anyone have examples using ng2-adal and calling secured external web api's? (With getting accestoken etc.)