Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Formatting issues

Introduction

Excerpt

Here is a small example for creating your own User Directory that might be interfacing with some unique situations. Here there is a combined CAS for login + LDAP for group identification.

For the website I am developing, I had a rather unique situation in which there is a built in Central Authentication System (CAS) that takes care of passwords/userid's and things like that. On the other hand, profile information (such as First Name / Last Name) and group information are located in an LDAP system. Additionally, I had to first only allow a certain subset of users from CAS to log in, and secondly I had to separate those that could log in into two groups based on some membership data from the FC installation.

...

Hope this helps someone somewhere!

getGroupUsers

Warning
titlegetGroupUsers Function Needed!

I left out this function from the original CFC. Basically it returns a empty string. This for me is fine, since:

.bq getGroupUsers is used for workflow - when approval is requested for an item FarCry checks to see who has permission to approve it AND has an email address and provides that as a list to the user. (Blair McKenzie)

displayPageLogin

Code Block
titledisplayPageLogin
borderStylesolid

<ft:processform action="Login">

...


                <cfldap 
                      server = "XXX"
                      port = "389"
                      action = "query"
                      name = "results"
                      start = "XXX"
                      filter = "XXX"
                      attributes = "*">
                <cfif results.RecordCount>
                    <!---No ticket and no session.ident variable:  redirect to CAS--->
                    
                    <cflocation url="/farcry/core/webtop/login.cfm?ud=CASLDAPUD&uid=#form.userid#" addtoken="no">

...

    
                </cfif>

...


            </ft:processform>

...


            <ft:form name="useridInput" action="XXX">

...


                <cfoutput><input class="required" type="string" name="userid" /></cfoutput>

...


                <ft:button value="Login" />

...


            </ft:form>

displayLogin

Code Block
titledisplayLogin
borderStylesolid

    <cfset session.loginReturnURL = "XXX" />

...


    <cfset session.loginReturnURL = replace( session.loginReturnURL, "logout=1", "" ) />

...


    <cfset session.loginReturnURL = replace( session.loginReturnURL, "&&", "" ) />