HTML Help Builder
Putting help behind application auth
Gravatar is a globally recognized avatar based on your email address. Putting help behind application auth
  Richard Kaye
  All
  Jan 23, 2020 @ 02:50pm

Hi Rick,

I'm using HHB to create HTML docs for our new app. I'd like to put those pages behind my application user auth, as opposed to leaving it open. Do you have any examples that might show how to force a login before the HTML help can be accessed?

TIA

Gravatar is a globally recognized avatar based on your email address. re: Putting help behind application auth
  Rick Strahl
  Richard Kaye
  Jan 23, 2020 @ 03:24pm

You can't really use Web Connection auth for static site content unless you make it part of your Web Connection application and you take over the .htm extension (and any images etc.). IOW, the app would end up having to serve the static content.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Putting help behind application auth
  Richard Kaye
  Rick Strahl
  Jan 24, 2020 @ 04:19am

Thanks, Rick.

So does that mean adding something to the process method or simply adding the extension to the ini? I also assume some code would have to be added to the help content templates to track logged in state?

Gravatar is a globally recognized avatar based on your email address. re: Putting help behind application auth
  Rick Strahl
  Richard Kaye
  Jan 24, 2020 @ 11:49am

No you would probably create a custom wwProcess class to handle all .htm page requests and intercept them then use ExpandTemplate() or TransmitFile() to display them. All you want to do is check for login, make sure you're logged in and if not redirect them back to the Login page.

In fact you'd probably just implement the OnProcessInit() method in that handler, and let the default ExpandScript() processing handle the display of all the pages.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Putting help behind application auth
  Richard Kaye
  Rick Strahl
  Jan 24, 2020 @ 12:29pm

Thanks again! Forgive the N00B question but the best way to create a custom process class is to...

Run the wizard?
VB inheritance from an existing process prg and rip out the stuff I don't need? A third way?

Gravatar is a globally recognized avatar based on your email address. re: Putting help behind application auth
  Rick Strahl
  Richard Kaye
  Jan 24, 2020 @ 09:44pm

Yes run the DO Console, then Create New Process Class and attach it to an existing application by pointing at the yourAppMain.prg file of your app.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Putting help behind application auth
  Richard Kaye
  Rick Strahl
  Jan 27, 2020 @ 09:46am

Thanks, Rick. I'll continue down this path and let you know if other questions arise.

© 1996-2024