Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

SUMMARY: All of these happens on Site A

  • User visits site A
  • User enter username and password
  • User click on Login Button
  • User authenticated on Site B behind the scene
  • User is shown a page on Site A that contains his/her profile from Site B as layout/styled from Site B
  • User can click links in the Profile page that links to other area in Site B Meaning: Session has to be maintained somehow

I have web application where I store users' password and username. If you logon to this site, you can login with the password and username to have access to your profile.

There is another option that requires you to login to my site from your site and have your profile displayed within your site. This is because you might already have a site that your clients know you with.

This link is close to what I want to do: http://aspmessageboard.com/showthread.php?t=235069

A user on Site A login to Site B and have the information on site B showing in site A. He should not know whether Site B exists. It should be as if everything is happening in Site A

This latter part is what I don't know to implement.

I have these ideas:

Have a fixed IFrame within your site to contain my site: but I am concerned about size/layout since different clients have different layout/size for their content section. I am thinking of how to maintain session too

A webservice: I don't know how feasible this is since the Password and ID are on my server. You may have to send them back and forth. It means client would have to code with my API. But I am not just returning data, I have to show them a page that contains the profile details

OpenID, Single-SignOn: Just guessing - but the authentication and data resides on my server. there is nothing to access on your side in this case

Examples: like login into facebook within my site and still be able to do post updates, receive notifications

Facebook implement some of these with IFrame e.g. the Like button

*NOTE: * I have tested the IFrame option. It worked but I still have to remove my site specific content like my page Banner, Side Navigation etc.

I was able to login normally as if I was actually on the site.

This show my GUI but - style sheet was missing - content not styled with CSS - Any relative url won't work. It would look for that resource relative to the current server. Unless I change links to absolute - Clicking on the LogIn button produces this error: The state information is invalid for this page and might be corrupted.

UPDATE: I was reading about REST webservice few days ago and I got this idea:

What about the idea of returning an XML from a webservice [REST or SOAP] and providing an XSLT (that I can provide) to display it. Thus they won't have to do much coding?

share|improve this question
4  
I feel compelled to ask you why you are seeking to do this. This could very easily be ethically questionable. –  maple_shaft Jun 13 '12 at 13:18
1  
as explained in the question, I have a site users use if they don't have a personal website. but if they do, and they don't offer the type of service I have, they could embed mine into theirs so they won't have to redirect to my site. Just like facebook does, You don't have to go to facebook to LIKE my page - that explains it –  tunmise fasipe Jun 13 '12 at 13:26
1  
facebook uses an API and injects a single button and a few lines of javascript, which is a bit different than your question.. Why don't you use DNS to modify at the domain level instead of trying to create some fancy API to inject code into their site? –  gorelative Jun 13 '12 at 13:40
    
Well, am seeking opinion. DNS - Domain Name Service? –  tunmise fasipe Jun 13 '12 at 13:57
1  
Facebook's like button can be an IFrame. –  Brian Jun 13 '12 at 14:16
show 2 more comments

1 Answer

up vote 1 down vote accepted

The simple approach:

  • IFrame

A better more modular approach:

  • Web service

simply create a web service that exposes two functions:

  • Authenticate (this takes, user name, and password, and Site API Key) returns sessionToken
  • GetUserProfile (this takes a sessionToken, and Site API Key, data type) and returns profile data eg JSON/XML/HTML

You can then write a API document for your clients. The clients can then style up the profile in whatever way they like.

EDIT:

For security reasons, I would add, that the webservice should be hosted with SSL, and use HTTPS.

share|improve this answer
    
I greatly appreciate your effort to answer my question. I like the webservice approach but the nature of my clients (low income, reluctant to change, pampering) they could turn down my product if integration is complex - they would want something that works in no time. For MARKETING reason, that's why I wanted something PLUGGABLE. Thanks again. –  tunmise fasipe Jun 14 '12 at 9:54
    
and what do you think about PHP CURL and its equivalence in C#, HttpWebRequest and HttpWebResponse? –  tunmise fasipe Jun 14 '12 at 9:58
1  
With the integration "guide" you can include a working example, in multiple languages (eg for PHP, asp.net, etc). This works great for our clients. We have had clients integrate with our services in a few hours of reading the documentation. –  Darknight Jun 14 '12 at 10:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.