Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access OData URLs with authentication

I have a OData Server which returns me a json. When I accessing the URL through a browser i need to input the username/password. Doesn't accept the entries which I do in the pop-up. Need to cancel it and then it shows me a dialog box after which i can see the required json.

I am not able to figure out the kind of authentication in use.

Using basic authentication in Postman client is not working. Any suggestions as to how do I go about using this URL both in postman and inside an Anuglar JS or Node JS program.

like image 265
CodePhobia Avatar asked Dec 14 '15 16:12

CodePhobia


People also ask

Which authentication strategy is used by OData?

The OData API is protected by means of Basic Auth and OAuth.

How do I connect to OData API?

Connect to the OData Sample ServiceGo to the main menu in Dundas BI and create a new data connector. Click the Name box and enter a name for this connector (e.g., OData Sample Service). Set the Data Provider dropdown to OData. Select the Authentication method.

What is an OData URL?

The Open Data Protocol (OData) enables the creation of REST-based data services, which allow resources, identified using Uniform Resource Identifiers (URLs) and defined in a data model, to be published and edited by Web clients using simple HTTP messages.


2 Answers

You can install interceptor in postman. Go to cookies tab next to body and install the interceptor then turn it on.After installing interceptor you can login with your user/pass and then send your request.

See this picture.enter image description here

like image 191
Mashtani Avatar answered Sep 30 '22 11:09

Mashtani


Thanks for the input.

But I got access to the code implementation which is accessing the URI which I want.

So There is a Sharepoint/C# application in the universe which is doing a Forms based authentication to get the data required. :/

Will try to reverse engineer that get it working in my Node App.

Cheers. :)

like image 28
CodePhobia Avatar answered Sep 30 '22 10:09

CodePhobia