locked
How do I connect to OData when it wants credentials? RRS feed

Answers

  • You follow whatever authentication mechanism that service implements. OData is very careful to NOT specify anything here. Since OData is layered on top of HTTP, it relies on HTTP for this fully. Alex wrote a great series of how to implement auth on OData when you're using WCF Data Services. It doesn't really apply if you're using ODataLib directly, but at least the general ideas are the same (and you might even be able to reuse some code). Unfortunately I think it assumes that the client knows which auth scheme to use. I don't know if there's a way to detect it. But that question would be better asked to some HTTP auth experts :-).

    Here are the blog posts about auth in WCF Data Services (and OData): http://blogs.msdn.com/b/astoriateam/archive/tags/authentication/

    Thanks,


    Vitek Karas [MSFT]

    • Marked as answer by DavidThielen Wednesday, August 8, 2012 9:03 PM
    Wednesday, August 8, 2012 9:33 AM
    Moderator

All replies

  • You follow whatever authentication mechanism that service implements. OData is very careful to NOT specify anything here. Since OData is layered on top of HTTP, it relies on HTTP for this fully. Alex wrote a great series of how to implement auth on OData when you're using WCF Data Services. It doesn't really apply if you're using ODataLib directly, but at least the general ideas are the same (and you might even be able to reuse some code). Unfortunately I think it assumes that the client knows which auth scheme to use. I don't know if there's a way to detect it. But that question would be better asked to some HTTP auth experts :-).

    Here are the blog posts about auth in WCF Data Services (and OData): http://blogs.msdn.com/b/astoriateam/archive/tags/authentication/

    Thanks,


    Vitek Karas [MSFT]

    • Marked as answer by DavidThielen Wednesday, August 8, 2012 9:03 PM
    Wednesday, August 8, 2012 9:33 AM
    Moderator
  • That's what I figured. Not an issue as we are set up to have the user specify it (same for pulling an XML file from a website).

    thanks - dave


    Who will win The International Collegiate Programming Championships?

    Wednesday, August 8, 2012 9:04 PM