This discussion is archived
5 Replies Latest reply: Nov 16, 2012 7:04 PM by mobra RSS

Automatically log in whoever is logged onto the PC?

Shaylan Newbie
Currently Being Moderated
In addition to APEX, we also use Microsoft SharePoint at my company. When accessing a SharePoint page, it "knows" who's logged into the PC and logs them in automatically, then provides a "Sign in as a Different User" option in case you need to switch. I've been asked to mimic this functionality in my APEX apps. Can anyone explain how to do this, or point me towards some resources that would help me figure it out?

Potentially relevant info: We're on APEX 3.1. I have access to our active directory server and have written procedures to authenticate users against it using their network logon and password. I'm just not sure how to retrieve the OS user from a webpage and automatically log them into the APEX application without requiring a password.

Thanks.
  • 1. Re: Automatically log in whoever is logged onto the PC?
    Sc0tt Expert
    Currently Being Moderated
    Search for NTLM
  • 2. Re: Automatically log in whoever is logged onto the PC?
    Sam_06 Pro
    Currently Being Moderated
    There are several ways to do this, but I've done this before via intergrating to LDAP. Ask if you are allowed to access your AD (Active Directory) where you can get users credentials and authenticate users based on that.. you can then write an ASP code that gets user id from network (NTLM) , translates the given non-APEX URL to an APEX URL along with the user name and some encrypted passcode to confirm that the given link/URL is generated by the current user ( not copied over to another machine for example) and then have your custom authentication scheme check if that userid is allowed to have access to your app.. I know there are too many details, but I gave you the key points that you need to research to make this happen.

    Sam
  • 3. Re: Automatically log in whoever is logged onto the PC?
    Shaylan Newbie
    Currently Being Moderated
    Thanks for the help, guys. Looks like I have some research to do. I was hoping it would be as simple as, "Just paste this javascript on the login page". I didn't expect it to be that easy, though. Nothing ever is.
  • 4. Re: Automatically log in whoever is logged onto the PC?
    974611 Newbie
    Currently Being Moderated
    Its not far off that.

    You create a custom authentication scheme called NTLM that calls a security package and thats pretty much it.

    If you search for the NTLM setup on here you'll find the detailed instructions.

    Good luck!
  • 5. Re: Automatically log in whoever is logged onto the PC?
    mobra Journeyer
    Currently Being Moderated
    In addition to APEX, we also use Microsoft SharePoint at my company.
    I have access to our active directory server
    I'm just not sure how to retrieve the OS user from a webpage and automatically log them into the APEX application without requiring a password.
    Sounds like you are using a lot of Microsoft server products, if so then why not run Apex through Microsoft IIS, which gives you Integrated Windows Authentication "for free":

    http://ora-00001.blogspot.com/2012/03/windows-ntlm-sso-with-apex.html



    - Morten

    http://ora-00001.blogspot.com

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points