Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 429
  • Last Modified:

NT domain controller authentication using Java

I am using Java Servlets on an NT machine and was wondering how I could go about getting user authentication from the NT domain controller.  
0
danGynn
Asked:
danGynn
  • 3
  • 3
1 Solution
 
jhanceCommented:
It's quite unclear to me just what you are trying to do.  

If it's to authenticate a remote user against the NT user account database, you'll need to call LogonUser() from advapi32.dll to get a token for that user.  Then what you do with the token depends on what you need to accomplish.

If you need to start an application you would use CreateProcessAsUser().  If you need to access a local resource on behalf of that user, you'll need ImpersonateLoggedOnUser().

How any of this is done from a Java Servlet is beyond me, however.  I'd suspect you need to implement this as a native class or use the JNI from JDK 1.2+
0
 
danGynnAuthor Commented:
I solved the problem using the mod_ntlm module for apache.  It uses the .htaccess file and authenticates via the server.
0
 
danGynnAuthor Commented:
This question has a deletion request Pending
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
jhanceCommented:
This question no longer is pending deletion
0
 
jhanceCommented:
I'd like to point out that my answer is STILL a valid answer to you question.  The fact that you decided on a different course of action doesn't make it less valid.
0
 
danGynnAuthor Commented:
Actually, your answer did NOT answer my question.  You mentioned some windows function call, but not how you would use it from a Java servlet.  However, if you are going to cry about it, I'll give you your points.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now