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!

Était-ce utile?

La 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.

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top