Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-17-2010, 03:32 PM   PM User | #1
SapAuthor
New to the CF scene

 
Join Date: May 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
SapAuthor is an unknown quantity at this point
Question Verification for API - Detect GET source?

Hey everyone,

I'm developing a calendar program for the company I work for. I am working right now on the API code for it, that will spit out either the XML, or stled XML of the calendar.

Some "events" are for non-public viewing, so i need to specify some sort of password or passcode in the API request. Is there any way to do this and keep it hidden?

What i'm mainly thinking is if there is some way that the API code can detect where the request came from (for instance, if the API request is coming from our dealer extranet, then it will be able to display the private information, vs if it is just a normal API request or from a source that doest not have permission, it won't show private information). Are there any tags or similar things that give the url of the ASP script that is posting a GET to the API, that the API can check and validate? Or other ideas?

Thanks a bunch.
SapAuthor is offline   Reply With Quote
Old 11-18-2010, 02:54 PM   PM User | #2
SouthwaterDave
Regular Coder

 
Join Date: May 2007
Location: UK
Posts: 180
Thanks: 0
Thanked 18 Times in 18 Posts
SouthwaterDave is on a distinguished road
How is your API implemented? As a web page or a web service, or something else altogether?

A web page or a web service could check the request's server variables to determine where the request came from. For instance, Request.ServerVariables("REMOTE_ADDR") returns the IP address of the remote client making the request.
SouthwaterDave is offline   Reply With Quote
Reply

Bookmarks

Tags
api, domain name, passcode

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:18 AM.


Advertisement
Log in to turn off these ads.