HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Integration of ocPortal with another site

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#109480 (In Topic #21582)

Fan in action

On ocPortal we have put our online help wiki, support files for download, etc. Our “Help” and “Support” buttons in our main software package now point to static HTML pages, but of course now we want them to point to our shiny new ocPortal content.  We have many customers with installs on their own systems, but a single help and support site which is on our servers.

I cannot seem to find anywhere in the docs where it discusses how to do an auto login onto ocPortal from another site. For example, our software at customer ABC would pass to my ocPortal login page “company=”ABC”, password=”****”. The generic user for ABC is in ocPortal as a regular user. We would want the portal to auto login the user and plop them on the Help home page.

Any pointers appreciated.
Thanks
Back to the top
 
Posted
Item has a rating of 5 (Liked by KingBast)  
Rating:
#109506
Avatar

Hi,

Possibly a hole in our docs here so I'll explain…

The login page in ocPortal is mostly a front end, and doesn't handle log in itself.

ocPortal handles log in anywhere as a part of the framework (i.e. any request ocPortal is handling).
It triggers if these post parameters are present:
  • login_username (required)
  • password (required)
  • remember (optional, set to '1' if cookies should be saved)
  • login_invisible (optional, set to '1' if the login should be invisible)

If posting from a different domain name then 'Form-posting partner sites' must be set to include the domain name you're using.

For completeness, this is what the login page does do:
  • Shows error messages if a log in fails
  • Performs after-login redirects
  • Handles log outs
  • Performs after-logout redirects
  • Handles Conceded mode
  • Handles "Become invisible" toggle

If coding a system to create an ocPortal login automatically (i.e. without needing to direct the user to a POST request) you'd need to set the session cookie to a random number, and then insert a row into the ocPortal sessions table to match against it.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#109515

Fan in action

Thanks for the response Chris. I am leaving on a trip for a week, will try this out as soon as I get back in the office.

Just in case you folks in merry ole' England feel like complaining about your weather, here in Texas it has been 108 degrees F for several days now
O_o    
Back to the top
 
Posted
Rating:
#109519
Avatar

Most of us English folks don't understand Fahrenheit, but I just looked it up, wow that's hot.

It's a lovely day today here 27C. That's quite enough for me.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#109744

Fan in action

27 C is much nicer :)
We are now at only 99 deg F, which is only 37 C. Break out the sweaters !

Unfortunately, after doing a search thru the docs, all of Admin, google search, PHP settings search, info.php, etc, I cannot find any type of reference to "Form-posting partner sites" or any incarnation of said words strung together. Sorry if this is a newbie question, but any help here appreciated.  Is this a setting, a PHP variable, other?

Thanks!
Back to the top
 
Posted
Rating:
#109746
Avatar

Hey, it should be in:

Admin Zone > Setup > Configuration > Security options > Advanced



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#109748

Fan in action

Doh, now I see it. I set the field to "www.ourSite.com" and presto, our partner site can log in AND we can specify what page to land on with various parameters.

If anyone wants more info on how we did this, let me know, I can provide examples.

Thanks Chris! In true British fashion, I dub thee "Sir Chris, the helpful"   :thumbs:
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: