I have followed this guide:
https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp
and I connect successfully. I would like to send the bearer token to my C# server and use it to call my workbench(another AD app) functions.
I am trying to use the bearer token I get from angular in a postman call and it is unauthorized. It is important to mention that I gave my angular client on AD permission to access my workbench instance and it's still not working, that leads me to some questions:
I have tried using a .NET client from this guide:
http://blog.pomiager.com/post/using-rest-api-in-azure-workbench-blockchain
and it works. I notice here that in the AuthenticationContext object it receives credentials that is using the Client ID and the Client Secret. I notice that in the angular AD example we never use the secret. But the thing is that, when looking at the guide to create your own workbench UI, in the authService.js, it never takes the secret as a parameter as well. As can be seen here:
I understand that that credentials should be set on the server. In the angular example that I provided there is also a ASP.NET server
How can I create a valid bearer token for the workbench from the angularJS AD example? Should I replace the OWIN lib with something else?
Thanks