Question

I'm trying to access my OData server using ASP.NET Identity for authentication. Is there a possibility to do that with JayData? Unfortunately, there's almost no information about that throughout the internet.

Or should one do authentication with OData and JayData with a different technology? Please consider that the server uses ASP.NET.

Thank you!

Was it helpful?

Solution

JayData supports basic authentication, so your JayData context can be initialized with the following parameters:

var yourContext = new YourContextType({
        name: "oData", 
        oDataServiceHost: '/Northwind.svc', 
        user: "user", 
        password: "password" })

Of course you should pass these parameters from a login form and publish your backend service over https.

OTHER TIPS

Downgrading to previous datajs versions (such as 1.0.3) will resolve this issue. Newer version of datajs are removing some headers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top