Gnome Screensaver Missing Lock Screen Prompt in Ubuntu Lucid 10.04

Posted by Quinn Madson | Posted in | Posted on 12:43 PM

4

For some reason, the unlock dialog box for Gnome Screensaver suddenly stopped appearing. Screensaver works fine but, move the mouse and no unlock prompt, just back to the screen saver. The only work-around was to press Ctrl-Alt-F1, login, and type the command:

killall gnome-screensaver
Although, after a while this gets annoying so, I looked for a better long term solution. Here it is:
sudo chmod a+r /etc/pam.d/*
That's it. I assume that the permissions may have been messed up during an update. Posted here for posterity.

CFEclipse Dictionary for CF on Wheels

Posted by Quinn Madson | Posted in | Posted on 9:56 PM

1

As far as I could tell, there was no CFEclipse dictionary available for CF on Wheels so I created one.


To get it, download the XML at: http://su.pr/6s1VUi

To use it:
  • Open your Eclipse plugins/ directory
  • Open the directory: org.cfeclipse.cfml_X/ (where X is your CFEclipse version number)
  • Open the directory: dictionary
  • Copy cfwheels.xml to this location
  • Close Eclipse if it is running
  • Open up: dictionaryconfig.xml
Change:
<version key="cf8" label="Coldfusion 8">
<grammar location="cf8.xml" />
<grammar location="user.xml" />
</version>
To:
<version key="cf8" label="Coldfusion 8">
<grammar location="cf8.xml" />
<grammar location="user.xml" />
<grammar location="cfwheels.xml" />
</version>
I am not sure if it is an Ubuntu bug but, any thing that is not in the first grammar file is not loaded in Eclipse. If you run into problems, just copy and paste the functions listed in cfwheels.xml to cf8.xml or whatever dialect you use. The other option is to create a separate CFWheels dictionary entry but, it doesn't work very well switching back and forth between dictionary sets.

In the likely event that I am struck by a bus, a very confused sperm whale, or bowl of petunias, I created a script that scrapes the CF on Wheels documentation and creates the dictionary XML. If more functions are added and the structure of the docs pages don't change immensely, rerun the script to refresh the dictionary XML.

Here's the code:

<cfparam name="url.page" default="0">
<cfparam name="url.start" default="0">
<cfparam name="url.end" default="0">

<!---
Strips all table and table content tags and extra whitespace from a string.

@param string String to format. (Required)
@return Returns a string.
@author Jared Rypka-Hauer (jared@web-relevant.com)
@version 1, August 25, 2005
--->
<cffunction name="detableize">
<cfargument name="string" type="string" required="true" />
<cfset var outputString = arguments["string"]>
<cfset outputString = reReplaceNoCase(outputString , "</*table>", "", "all")>
<cfset outputString = reReplaceNoCase(outputString , "</*td>", "ø", "all")>
<cfset outputString = reReplaceNoCase(outputString , "</*t[rhd](\s*\w*=*""*\w*""*)*>", "", "all")>
<cfset outputString = reReplaceNoCase(outputString , "(?m)^\s*", "", "all")>
<cfset outputString = reReplaceNoCase(outputString , "\n{2,}", "#chr(10)#", "all")>
<cfreturn outputString />
</cffunction>

<!--- based on function above; removes garbage from api page --->
<cffunction name="detagify">
<cfargument name="string" type="string" required="true" />
<cfset var outputString = arguments["string"]>
<cfset outputString = reReplaceNoCase(outputString , "</*li>", "", "all")>
<cfset outputString = reReplaceNoCase(outputString , "<code>[a-z\(\)]*</code>", "", "all")>
<cfset outputString = reReplaceNoCase(outputString , "<a href=""", "", "all")>
<cfset outputString = reReplaceNoCase(outputString , """></a>", ",", "all")>
<cfset outputString = reReplaceNoCase(outputString , "(?m)^\s*", "", "all")>
<cfset outputString = reReplaceNoCase(outputString , "\n{2,}", "#chr(10)#", "all")>
<cfreturn outputString />
</cffunction>

<cfscript>
/**
* Returns the content enclosed in a tag pair.
*
* @param tag The tag to look for. Should be passed without < or > and without attributes. (Required)
* @param string The string to search. (Required)
* @return Returns a string.
* @author Johan Steenkamp (johan@orbital.co.nz)
* @version 1, September 16, 2002
*/
function getTagContent(tag,str) {
var matchStruct = structNew();
var startTag = "<#tag#[^>]*>";
var endTag = "</#tag#>";
var endTagStart = 0;
matchStruct = REFindNoCase(startTag,str,1,"true");
if(matchStruct.len[1] eq 0 ) return "";
endTagStart = REFindNoCase(endTag,str,matchStruct.pos[1],"false");
return Mid(str,matchStruct.pos[1]+matchStruct.len[1],endTagStart-matchStruct.pos[1]-matchStruct.len[1]);
}
</cfscript>

<!--- get urls --->
<cfhttp url="http://cfwheels.org/docs/function/"></cfhttp>
<cfscript>
urlsFilecontent = cfhttp.filecontent;
urlsStartPoint = find("<h1>Wheels <abbr title=""Application Programming Interface"">API</abbr></h1>", urlsFilecontent);
urlsEndPoint = len(urlsFilecontent) - urlsStartPoint;
urlsChopped = mid(urlsFilecontent, urlsStartPoint, urlsEndPoint);
urlsChopped = getTagContent("ul", urlsChopped);
urlsChopped = detagify(urlsChopped);
urlsChopped = listToArray(urlsChopped);
dictionary = "";
itemsPerPage = 25;
urlsPages = ceiling(arrayLen(urlsChopped) / itemsPerPage);
</cfscript>

<cfoutput>
<h1>CFWheels API to CFEclipse Dictionary Conversion</h1>
<p>#arrayLen(urlsChopped)# functions listed in documentation. Function conversions are broken up into batches to prevent timeouts.
Click below to convert a batch.</p>
<ul>
<cfloop from="1" to="#urlsPages#" index="i">
<cfscript>
if (i neq 1) {
start = (i - 1) * itemsPerPage;
end = start + itemsPerPage - 1;
} else {
start = 1;
end = itemsPerPage - 1;
}

if (end gt arrayLen(urlsChopped)) {
end = arrayLen(urlsChopped);
}
</cfscript>
<li><a href="?page=#i#&start=#start#&end=#end#">#i#: #start# - #end#</a></li>
</cfloop>
</ul>
</cfoutput>

<cfif url.page>
<cfloop from="#url.start#" to="#url.end#" index="i">

<!--- convert html to cfeclipse dictionary xml --->
<cfhttp url="http://cfwheels.org#urlsChopped[i]#"></cfhttp>
<cfset functionFilecontent = cfhttp.filecontent>

<cfscript>
functionStartPoint = findnocase("contentWrapper", functionFilecontent);
functionEndPoint = len(functionFilecontent) - functionStartPoint;
functionChopped = mid(functionFilecontent, functionStartPoint, functionEndPoint);
functionName = getTagContent("code", functionChopped);
functionChopped = replacenocase(functionChopped, "<code>", "", "all");
functionChopped = replacenocase(functionChopped, "</code>", "", "all");
functionDescription = getTagContent("p", functionChopped);
functionParameters = getTagContent("tbody", functionChopped);
functionParameters = detableize(functionParameters);
functionParameters = listToArray(functionParameters, "ø", true);
</cfscript>

<cfoutput>
<cfsavecontent variable="functionOutput">
<function xmlns="http://www.cfeclipse.org/version1/dictionary" name="#xmlFormat(functionName)#" returns="">

<help><![CDATA[
#xmlFormat(trim(functionDescription))#
]]></help>
<cfloop from="1" to="#arrayLen(functionParameters)-1#" index="i" step="5"><cfif functionParameters[i+2] eq "No"><cfset required="false"><cfelse><cfset required="true"></cfif>
<parameter name="#xmlFormat(trim(functionParameters[i]))#" type="#xmlFormat(trim(functionParameters[i+1]))#" required="#xmlFormat(trim(required))#">
<help><![CDATA[
#xmlFormat(trim(functionParameters[i+4]))#
]]></help>
</parameter>
</cfloop>
</function>
</cfsavecontent>
</cfoutput>

<cfset dictionary = dictionary & functionOutput>

</cfloop>
<cfoutput>
<textarea cols="150" rows="50">
#dictionary#
</textarea>
</cfoutput>
</cfif>
Hopes this helps some other CFEclipse & CF on Wheels developers out there.

Zimbra ZmAppt Object Properties

Posted by Quinn Madson | Posted in | Posted on 1:45 PM

0

As of this writing in July of 2009, the only documentation of the Zimbra ZmAppt object is a preliminary draft of a white paper released by Zimbra in 2006. The documentation is out of date so, I am putting up an example of a current ZmAppt object (as of release 5.0.18) here, in case anyone is googling for updated documentation like I was.

ALARM undefined
ALLDAYEVENT false
ATTENDEES [empty string]
ENDDATE Tue Jul 28 2009 16:00:00 GMT-0500 (CST)
EXCEPTION undefined
ID f6ec6325-5dd9-452c-aec5-c60561900b79:560
ISRECURRING false
LOCATION Test Location 254
NOTES Test Notes 254
OTHERATTENDEES undefined
RESOURCES [empty string]
SRCOBJ ZmAppt
STARTDATE Tue Jul 28 2009 11:00:00 GMT-0500 (CST)
SUBJECT Test Event 254
TIMEZONE (GMT-06.00) Central Time (US & Canada)
TYPE ZmAppt
UID 02b205bf-72cc-48c7-a0ec-0862ae321124

Here is an example of the srcObj above:
ADDCHANGELISTENER undefined
ADJUSTMS undefined
ALARM undefined
ALARMDATA undefined
ALLDAYEVENT false
ATTACHMENTS undefined
CACHE undefined
CANCEL undefined
CLEAR undefined
COMPNUM undefined
CONSTRUCTOR function Object() { [native code] }
CREATE undefined
DELETELOCAL undefined
ENDDATE Tue Jul 28 2009 16:00:00 GMT-0500 (CST)
ENDSINUTC undefined
FBA undefined
FLAGLOCAL undefined
FOLDERID undefined
FRAGMENT undefined
FREEBUSY undefined
GETATTACHLISTHTML undefined
GETATTACHMENTS undefined
GETATTENDEES undefined
GETATTENDEESTEXT undefined
GETATTENDEETOOLTIPDATA undefined
GETATTENDEETOOLTIPSTRING undefined
GETBYID undefined
GETCOMPNUM undefined
GETDATERANGE undefined
GETDEFAULTDNDACTION undefined
GETDETAILS undefined
GETDURATION undefined
GETDURATIONTEXT undefined
GETENDTIME undefined
GETFOLDER undefined
GETFOLDERID undefined
GETHTMLSUMMARY undefined
GETLOCALFOLDERID undefined
GETLOCATION undefined
GETMAILNOTIFICATIONOPTION undefined
GETNAME undefined
GETNOTESPART undefined
GETORGANIZER undefined
GETORIGSTARTDATE undefined
GETORIGSTARTTIME undefined
GETORIGTIMEZONE undefined
GETPARTICIPANTSTATUSSTR undefined
GETPRINTHTML undefined
GETRECURBLURB undefined
GETRECURTYPE undefined
GETREMINDERLOCATION undefined
GETREMINDERNAME undefined
GETREMOTEFOLDEROWNER undefined
GETRESTURL undefined
GETSENTBY undefined
GETSHORTSTARTHOUR undefined
GETSTARTTIME undefined
GETSUMMARY undefined
GETTAGIMAGEINFO undefined
GETTEXTSUMMARY undefined
GETTIMEZONE undefined
GETTOOLTIP undefined
GETUNIQUEENDDATE undefined
GETUNIQUEID undefined
GETUNIQUESTARTDATE undefined
GETURL undefined
HASALARMDATA undefined
HASATTACHMENTS undefined
HASATTENDEEFORTYPE undefined
HASATTENDEES undefined
HASPERSONATTENDEES undefined
HASTAG undefined
ID f6ec6325-5dd9-452c-aec5-c60561900b79:560
INVID undefined
ISALARMINRANGE undefined
ISALARMINSTANCE undefined
ISALLDAYEVENT undefined
ISCUSTOMRECURRENCE undefined
ISENDINRANGE undefined
ISEXCEPTION undefined
ISINRANGE undefined
ISMULTIDAY undefined
ISORG undefined
ISORGANIZER undefined
ISOVERLAPPING undefined
ISPRIVATE undefined
ISREADONLY undefined
ISRECURRING false
ISSHARED undefined
ISSTARTINRANGE undefined
LIST undefined
LOCATION location 254
MESSAGE undefined
MODIFY undefined
MOVE undefined
MOVELOCAL undefined
NAME undefined
NOTESTOPPART undefined
NOTIFYDELETE undefined
NOTIFYMODIFY undefined
ORGANIZER undefined
ORIGATTENDEES undefined
ORIGEQUIPMENT undefined
ORIGLOCATIONS undefined
OTHERATTENDEES undefined
PARSEALARM undefined
PARSEALARMDATA undefined
PRIORITY undefined
PRIVACY undefined
PTST undefined
RECURRING undefined
REMOVEALLCHANGELISTENERS undefined
REMOVEALLTAGSLOCAL undefined
REMOVEATTACHMENT undefined
REMOVECHANGELISTENER undefined
RESETREPEATCUSTOMDAYOFWEEK undefined
RESETREPEATMONTHLYDAYLIST undefined
RESETREPEATWEEKLYDAYS undefined
RESETREPEATYEARLYMONTHSLIST undefined
RIDZ undefined
RSVP undefined
SAVE undefined
SENTBY undefined
SERIESINVID undefined
SETALLDAYEVENT undefined
SETATTACHMENTS undefined
SETATTENDEES undefined
SETATTENDEETOOLTIPDATA undefined
SETDATERANGE undefined
SETENDDATE undefined
SETFOLDERID undefined
SETFROMMAILMESSAGE undefined
SETFROMMESSAGE undefined
SETINCLUDEEDITREPLY undefined
SETMAILNOTIFICATIONOPTION undefined
SETNAME undefined
SETNOBUSYOVERLAY undefined
SETORGANIZER undefined
SETRECURTYPE undefined
SETREMINDERMINUTES undefined
SETRSVP undefined
SETSTARTDATE undefined
SETTEXTNOTES undefined
SETTIMEZONE undefined
SETTYPE undefined
SETVIEWMODE undefined
SHOULDRSVP undefined
SHOWBLOBMISSINGDLG undefined
STARTDATE Tue Jul 28 2009 11:00:00 GMT-0500 (CST)
STARTSINUTC undefined
STATUS undefined
TAGHASH undefined
TAGLOCAL undefined
TAGS undefined
TIMEZONE undefined
TOOLTIP undefined
TOSTRING function toString() { [native code] }
TRANSPARENCY undefined
TYPE undefined
TZO undefined
UID 02b205bf-72cc-48c7-a0ec-0862ae321124
UNIQSTARTTIME undefined
VIEWMODE undefined
_ADDATTENDEESTOSOAP undefined
_ADDATTENDEETOSOAP undefined
_ADDDATETIMETOSOAP undefined
_ADDEXTRASTOSOAP undefined
_ADDINVITEANDCOMPNUM undefined
_ADDLOCATIONTOSOAP undefined
_ADDNOTESTOSOAP undefined
_ADDXPARAMTOSOAP undefined
_ADDXPROPSTOALARM undefined
_ADDXPROPSTOSOAP undefined
_ATTENDEES undefined
_CURRENTLYLOADED undefined
_DOCANCEL undefined
_EVT undefined
_EVTMGR undefined
_FANOUTFIRST undefined
_FANOUTLAST undefined
_FANOUTNUM undefined
_GETATTR undefined
_GETCLEANHTML2TEXT undefined
_GETDEFAULTBLURB undefined
_GETDEFAULTFOLDERID undefined
_GETFLAGS undefined
_GETINVITEFROMERROR undefined
_GETSOAPFORMODE undefined
_GETTEXTSUMMARYTIME undefined
_GETTTDAY undefined
_HANDLECANCELERROR undefined
_HANDLEERRORGETDETAILS undefined
_HANDLEERRORGETDETAILS2 undefined
_HANDLERESPONSEGETDETAILS undefined
_HANDLERESPONSESEND undefined
_LAYOUT undefined
_LOADFROMDOM undefined
_NOBUSYOVERLAY undefined
_NOTIFY undefined
_ORIG undefined
_ORIGSTARTDATE undefined
_ORIGTIMEZONE undefined
_PARSEFLAGS undefined
_PARSETAGS undefined
_PTSTLOCATIONMAP undefined
_RECURRENCE undefined
_REMINDERMINUTES undefined
_REPLIES undefined
_RESETCACHED undefined
_SENDNOTIFICATIONMAIL undefined
_SENDREQUEST undefined
_SETALARMDATA undefined
_SETALARMFROMMESSAGE undefined
_SETALARMXPROPS undefined
_SETEXTRASFROMMESSAGE undefined
_SETNOTES undefined
_SETRECURRENCE undefined
_SETSIMPLESOAPATTRIBUTES undefined
_SETTIMEFROMMESSAGE undefined
_STARTTIMEUNIQID undefined
_TOOLTIP undefined
_TRIMNOTESSUMMARY undefined
_UNIQID undefined
_UPDATEPARTICIPANTSTATUS undefined
_VALIDATTACHMENTS undefined

Upgrading MySQL 3.23.58 to 5 [WIP]

Posted by Quinn Madson | Posted in | Posted on 8:19 PM

0

Had to upgrade mass amounts of data from outdated MySQL 3.23 to 5. Couldn't find any good guides so I am attempting to make one. This is currently a work in progress. I will add more as I get farther.

Backup existing data:
mysqldump --all-databases --quote-names -u root -p > backup.sql

I built a virtual Redhat Enterprise Linux server using VirtualBox to test out the upgrade path before I did it on the production server. This process is pretty easy and well documented. Install the RPM for MySQL server and client.

While trying to re-import the SQL, it failed several times. As I was migrating a little more than 100 databases, I found it handy to have a script that removes all the databases when the import failed. Here's what i did:
grep 'CREATE DATABASE' backup.sql > bobby_droptables.sql
vi bobby_droptables.sql
:% s/CREATE/DROP/g
** Remove the line: DROP DATABASE mysql; **

If the import fails, you can run:
cat bobby_droptables.sql | mysql -u root -p

Found out there is a bug in "--quote-names". It does not quote database names, only tables. This is fixed in version 4 which does me no good. I need to escape all my database names in quotes because Ensim created database names as SITENAME_-_PROJECTNAME.

Did this instead:
vi backup.sql
:% s/CREATE\sDATABASE\s\/\*\!32312\sIF\sNOT\sEXISTS\*\/\s\([a-zA-z0-9\_\-]*\);/CREATE DATABASE `\1\`;/g
The above RegEx puts back ticks around all database names.

My backup.sql had create statements such as this:
CREATE DATABASE /*!32312 IF NOT EXISTS*/ some_database_name_here;
If your statement is different you may need to tweak the RegEx above.

Also, I added:
DROP DATABASE mysql;
... immediately before the CREATE DATABASE mysql; statement. As of now, I don't know if this will work or not. I hope that removing the mysql database momentarily will not cause any catastrophes. I'm hoping that replacing the database will restore all the existing usernames and passwords for the databases. It worked!

Now after all this, I was finally able to import the sql:
cat backup.sql | mysql -u root -p --verbose
--verbose is nice because while importing about 300mb of SQL, I kept thinking that the thing was gonna stall out and then would manually run:
mysql -u root -p
show databases;
but with --verbose you get to see all the SQL whiz past your screen.

SQL Developer + tnsnames.ora for UWM

Posted by Quinn Madson | Posted in | Posted on 12:22 PM

0

After completing the steps below for your platform, TNS aliases will be available in Oracle SQL Developer in the "New/Select Database Connection" dialog by selecting "TNS" for the "Connection Type" combo box. These steps are only necessary if you can't or don't want to install the Oracle Client for your platform.

For Linux machines:
-get tnsnames.ora from: https://mumbles.imt.uwm.edu/dbdoc/tnsnames-noworld.php
-copy the file to: /etc

For Windows XP machines:
-get tnsnames.ora from: https://mumbles.imt.uwm.edu/dbdoc/tnsnames-world.php
-copy to c:\tnsnames\ (or some other directory where it will never be moved)
-right-click "My Computer" and select "Properties"
-click "Advanced" tab
-click "Environment Variables"
-under "System variables" click "New"
-"Variable name:" TNS_ADMIN (must be caps)
-"Variable value:" c:\tnsnames\ (or whatever directory you used above)
-Click "OK"
-Click "OK"
-Click "OK"

Ref:
http://wiki.oracle.com/page/SQL+Developer+FAQ?t=anon

* How does SQL Developer find my TNSNames file?
o SQL Developer checks the following:
1) $HOME/tnsnames.ora
2) $TNS_ADMIN/tnsnames.ora
3) /etc/tnsnames.ora ( non-windows )
4) $ORACLE_HOME/network/admin/tnsnames.ora
5) Registry Key

Wicked Juju

Posted by Quinn Madson | Posted in | Posted on 11:05 PM

0

Spent a few hours migrating from an old media server to a new one. For the most part everything went great except the MediaMVP running MVPMC would not load the dongle.bin.config. I assumed my TFTP server was mis-configured, the mvpmc commandline switches were wrong, etc.

No dice!

Found this wicked juju from: http://mlblog.osdir.com/multimedia.mvpmc.user/2006-05/msg00020.shtml
Reposting it here for posterity:

Guys,

See my post in the user group. I've posted an incantation that allows the MVP to boot. The problem with this H1 appears identical to the same problem I have with my H2. I'm posting an update later on more findings I've had with long vs short power cycles and using MVP relay. Here's the reader's digest procedure to get a successful boot (from an H2):

After trying several experiments, the following sequence got me back to reliable time and time again booting (until you boot from flash again):

* Unplug the MVP for (I got it to work with a 90 second to 120 second cycle).
* After the 120 seconds have elapsed, unplug the ethernet cable (I think leaving it plugged in may help bleed off any capacitors)
* Apply the power again and wait for the MVP to get to the point where it complains about not finding a server and asks you to press OK to re-scan. You'll also notice that your "favorite server" has disappeared from the list.
* Power it down
* Plug in the ethernet cable
* Power it up (no waiting)
* You should get past the hanging last square
* When you get to the screen that states to press OK within 3 seconds to configure press OK
* You should notice that the MVP is re-scanning and your available server should appear on the list.
* Press OK to save the configuration (this takes a while and I suspect clears out any "bad" data that may be causing the problem)
* The MVP restarts
* You get to the screen with the 10 squares and dongle.bin.ver is requested and served at about the 3rd square. Then dongle.bin gets requested and served and now the text LOADING APPLICATION appears above the 10 squares and they all fill completely and stop once all full (NOTE: only one cycle and the LOADING APPLICATION seem to indicate that its working)
* There is a delay as the mvpmc application loads and screen flashes as it boots up perfectly.

Please let me know if this works for you as well...

Cheers...

Sergio
It works ... as goofy as it seems ... it works.

CAS + ColdFusion

Posted by Quinn Madson | Posted in | Posted on 9:24 AM

3

The example available from JA-SIG is some of the ugliest code I've seen lately. This is what I came up with (based on their example code):
Application.cfm

<cfapplication name="my_awesome_app_name_here"
clientmanagement="yes" sessionmanagement="yes"
setclientcookies="yes" setdomaincookies="no"
loginstorage="session">
index.cfm
<!--- globals --->
<cfparam name="url.ticket" default="">
<cfparam name="username" default="">
<cfparam name="url.action" default="">
<cfscript>
cas_path = "https://cas-server.example.edu/cas/";
app_path = "https://coldfusion-server.example.edu/path/to/this/app/";
cas_url = cas_path & "login?" & "service=" & app_path;
</cfscript>

<!--- session init --->
<cflock timeout="10" scope="session" type="readonly">
<cfparam name="session.username" default="">
<cfparam name="session.authorized" default="0">
</cflock>

<!--- logout action --->
<cfif url.action eq "logout">
<!--- session reset --->
<cflock scope="session" timeout="30" type="exclusive">
<cfset session.username = "">
<cfset session.authorized = "0">
</cflock>

<cfset cas_url = cas_path & "logout">
<cflocation url="#cas_url#" addtoken="false">

<cfelse>
<!--- auth check --->
<cfif not len(trim(session.username))>
<cfif not len(trim(ticket))>
<cflocation url="#cas_url#" addtoken="no">
<cfelse>
<cfset cas_url = #cas_path# & "serviceValidate?ticket=" & url.ticket & "&" & "service=" & app_path & "/">
<cfhttp url="#cas_url#" method="get"/>
<cfset objXML = xmlParse(cfhttp.filecontent)>
<cfset SearchResults = XmlSearch(objXML,"cas:serviceResponse/cas:authenticationSuccess/cas:user")>

<cfif arraylen(SearchResults)>
Raw XML:<cfdump var="#cfhttp.filecontent#">
<cfdump var="#objXML#" label="CAS Results">
<cfdump var="#SearchResults#" label="Parsed CAS Results">
<cfset username = SearchResults[1].XmlText>
<cflock scope="session" timeout="30" type="exclusive">
<cfset session.username = username>
<cfset session.authorized = "1">
</cflock>
<cfelse>
<cflocation url="#cas_url#" addtoken="no">
</cfif>
</cfif>
</cfif>



<cfif structKeyExists(url, "accessdenied")>
Access Error
<cfelse>
Authenticated.<br/>
<cfdump var="#session#" label="ColdFusion Session Object">
<a href="?action=logout">Logout</a><br/>
</cfif>
</cfif>
Honestly, it's a pretty simple process:
  • Check for a ColdFusion session
  • If one doesn't exist, redirect to CAS and provide a call back URL
  • When CAS redirects back to your application you grab the ticket and verify it server to server via cfhttp.
  • If the ticket checks out, you create a ColdFusion session and use it within your application.
The point of this example is to keep it simple. The code is commented to clue you into where the different components would plug into the framework of your choice.