logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: authenticate username/pwd using oracle stored procedure?
Author
timc



Joined: 08 Apr 2014
Posts: 3

PostPosted: Tue 08 Apr '14 19:28    Post subject: authenticate username/pwd using oracle stored procedure? Reply with quote

I have an app that opens a new browser window to a URL that opens a PDF file at a named destination. For example:

https://www.mydomain.com/myFile.pdf#nameddest=Chapter3

I need to authenticate each user that enters this link, but preferably only once per browser session (valid until user closes browser). This authentication process needs to be performed by an oracle-database stored procedure (via a Java servlet, or other technology).

Is this possible? Anyone can outline the steps or reference a link?

The idea would be when the user enters this link, that a popup window appears asking for a username and password, which then get verified by the stored procedure, and then, and only then, the URL address is allowed to proceed.

I know I can implement password protection in `.htaccess` as follows.

AuthType Basic
AuthName "Secured Area"
AuthUserFile /path/to/.htpasswd
<Files "myFile.pdf">
Require valid-user
</Files>

But, I need this process to connect to the stored procedure to validate the user, because this stored procedure has to apply business logic to determine the users' subscription status, etc., which can change at any time.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sun 20 Apr '14 19:36    Post subject: Reply with quote

mod_authn_dbd can access the database directly... no need for scripting.

http://httpd.apache.org/docs/current/mod/mod_authn_dbd.html
Back to top


Reply to topic   Topic: authenticate username/pwd using oracle stored procedure? View previous topic :: View next topic
Post new topic   Forum Index -> Apache