As with pretty much everything in the ADAL packages, this is something that seems like it should be pretty straight-forward, but isn't.
Before we go on to SignalR, we need to have a look at how we access a Web API endpoint that requires authentication from JavaScript. If you're already familiar with AD and bearer…
Niche, right? Yes. But this has caused me a day of headaches so posting here to save anyone else from the pain.
WebAPI
Say we already have Autofac set-up with your WebAPI. So we have something like this:
var builder = new…
This is quite niche but caught me out the other day.
Let’s say you have a person entity:
public class Person
{
public int Id { get; set; }
public string Name { get; set; }
public int Age { get; set; }
}
and you have a WebAPI method that takes in a group:
public class UsersController : ApiController
{
…