• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFLDAP Autologin with Activedirectory

Participant ,
Sep 06, 2006 Sep 06, 2006

Copy link to clipboard

Copied

Hi,

I currently use ASP to get the username of the person logged in, and use this to log them in automatically to our intranet. Obviously this reduces the amount of password prompts, which is good.

However, I would like to do this with CF, I can get cfldap to work, but is there anyway I can do an autologin as with ASP.

Any help would dbe really appreciated.

Thankyou

TOPICS
Advanced techniques

Views

602

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 06, 2006 Sep 06, 2006

Copy link to clipboard

Copied

However, I would like to do this with CF, I can get cfldap to work,
but is there anyway I can do an autologin as with ASP.

Yes, probably quite easily. What are you login the user into where and how?

In other words exactly what do you want to do?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 06, 2006 Sep 06, 2006

Copy link to clipboard

Copied

Assuming you are using Internet Information Services on the server (which might be a false assumption!)

Make sure your website is using Windows Integrated Authentication. (Do a web search on Windows Integrated Authentication)

Then, in your CF Code (I do this on my application.cfm page), you could do this: <CFSET UserName = #CGI.AUTH_USER#>

This will assign the username that the person is logged in as to a variable called "username".

If the variable is undefined, use CFLOCATION to shuffle the user to a login page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 06, 2006 Sep 06, 2006

Copy link to clipboard

Copied

Thanks for your replies.

Im using IIS and have Windows Authentication turned on.

Ive got the basics of this working with IE thanks, problem is FF still prompts me for a username/ password, does Windows Authentication not work with FF?

Thankyou

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 06, 2006 Sep 06, 2006

Copy link to clipboard

Copied

Ive got the basics of this working with IE thanks, problem is FF still
prompts me for a username/ password, does Windows Authentication not
work with FF?

Yes and no. Yes windows integrated authentication works in FF, no it
does not work behind the scenes without a prompt dialog box. That only
happens with IE.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 06, 2006 Sep 06, 2006

Copy link to clipboard

Copied

Not sure if this will help.. I found it durng a quick web search on the problem...

If you need Windows Authentication in firefox do the following:

Open firefox

Browse to about:config

Find “network.automatic-ntlm-auth.trusted-uris”

Modify the value and enter in your intranet sites that you must pass your username and password to.

For some sites I connect to I also had to add values to:

“network.negotiate-auth.delegation-uris”
“network.negotiate-auth.trusted-uris”

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 07, 2006 Sep 07, 2006

Copy link to clipboard

Copied

Great, thanks for your replies.

I've got authenticaion working in FF thankyou, my other problem is retreiving the groups that users are in. I've read about using the vertical pipe "|" as an attribute, so you can loop through the groups, does anyone know how to use this? Or does anyone else have any ideas?

Thankyou

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 07, 2006 Sep 07, 2006

Copy link to clipboard

Copied

LATEST
Use cfldap and then pull the attribute "memberOf". This will give a list of the groups to which the user belongs. Hope that this helps. Thanks.

Chris

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation