360 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
Latest 7 Posts
Oh what a difference an S makes
Thu, Mar 11th 2010 80
New family blog
Thu, Mar 11th 2010 26
My mother helps stop MSDS (Memory Stick Disappearnce Syndrome)
Mon, Mar 8th 2010 91
Is "a" Sandwich a category error and can mayonasie dribble be accurately measured
Sat, Mar 6th 2010 35
Good Music , good company and craic in the nineties @ the Beflast songwriters festival
Fri, Mar 5th 2010 21
If curling were easy it would be called Hockey
Mon, Mar 1st 2010 50
ILUG 10 Preperations gathers pace ... poster ideas
Wed, Feb 24th 2010 111
Top 10
ILUG 10 Preperations gathers pace ... poster ideas
Wed, Feb 24th 2010 111
My mother helps stop MSDS (Memory Stick Disappearnce Syndrome)
Mon, Mar 8th 2010 91
Access the clipboard in Javascript
Sun, Feb 14th 2010 88
Oh what a difference an S makes
Thu, Mar 11th 2010 80
....and while I am at it, Ireland WTF?
Sun, Feb 14th 2010 59
If curling were easy it would be called Hockey
Mon, Mar 1st 2010 50
A new 419 Scam arrived this morning and I just couldnt resist
Fri, Dec 11th 2009 42
Enthusions and Indifferons - The physics of not being arsed
Sun, Feb 14th 2010 40
A Credit Crunch Variation on a 419 Theme
Fri, Oct 24th 2008 37
BBA - Breeding Bananas for Anguilla
Thu, May 28th 2009 35


FLEX - Logging onto a Domino server from inside a FLEX app
   

Now don't queue up to shout at me.. this is a bit of a kludge and it works, however it does rely on some facilities of domino that may or may not be continued to be supported.

When you have Session Authentication enabled on your server and you log onto the server a cookie is dropped called DomAuthSessId and this cookie is passed back and forth to the server with every HTML page that is served.

Luckly in FLEX when you  log on to the server and use the HTTPService or WEBService objects this cookie is passed back to the server on each POST or GET that you call.. But how do you get this cookie there in the first place? Well the easiest way is to lock down your NSF so that Anonymous has no access and when accessed from the web the default server logon screen is displayed. Now far be it from me to say that it looks like shite but lets be fair is is rather 1990's in appearance. It would be much nicer if you could log on from the nice shiney RIA that Flex provides.

This is how I did it.

I need a HTTPService object to do the logon
<mx:HTTPService id        ="myLogon"
                    url      ="http://www.mynotesserver.com/names.nsf?logon"
                    method   ="POST"                
                    fault    ="logonFail()"    
                    result   ="logonResult(event)">    
                    <mx:request xmlns="">
                            <username>{username.text}</username>
                            <password>{password.text}</password>
                            <redirectto>http://www.mynotesserver.com/logonok?openagent</redirectto>
                    </mx:request>
</mx:HTTPService>
OK what's happening above
The HTTP Server i have defined will goto the URL specified in the URL setting which as you can see is the familiar names.nsf?logon URL and it will be a POST transaction rather than a GET
If the call successfully returns well formated XML actionscript function logonresult() will fire. If the connection fails OR poorly formatted XML is returned (as is the case if the call returns an HTML error page) the actionscript function logonFail() is called.
At the bottom i have defined 3 Paramaters that will be passed username, password and redirectto. Username is bound to a text input field called username in the flex application likewise password is bound to a similar field. Redirectto on the other hand points at logonok?openagent and this agent will be called if and only if the logon is processed by the server and the user is authenticated.

The logonFail() function looks like this

private function logonFail():void
{            
                Alert.show("Sorry - Your Logon Attempt failed")
}
The logonResult() function looks like this
private function logonResult(event:ResultEvent):void
            {                    
                 Alert.show("Hello there You are In!");        
            }
And the LS agent LogOnOk looks like this
Sub Initialize
    Print |Content-Type:text/xml|        
    Print |<?xml version="1.0" encoding="ISO-8859-1"?>|    
    Print | <loggedon>yes</loggedon> |    
End Sub

As you can see the LS simply returns some well formed if relatively meaningless XML should the signon fail for any reason some nasty HTML will be returned which will cause Flex to fire the logonFail() function.

Now although FLEX does not refresh the page the SWF is embedded in every time the server is contacted it does accept the cookies that are sent back from the server and placed them as normal on the page. So when you do something like the above in your own Flex app, and logon is sucessful when you go and look you will see the DomAuthSessId cookie appear, this then gets passed on each successive HTTPService call to your server (for as long as the cookie survives)

---------------------
http://feedproxy.google.com/~r/dominoyesmaybe/~3/TFBfbXFDovE/flex-logging-onto-server-from-inside.html
Oct 23, 2009
15 hits



Recent Blog Posts
80


Oh what a difference an S makes
Thu, Mar 11th 2010 3:24p   Steve McDonagh
Just comming into my blog and typed this http://doiminoyesmaybe.blogpot.com and ended up a href="http://dominoyesmaybe.blogpot.com/"here/a.. just my luck..I have a german porn star as a doppleganger and a reglious site as a typo link.. hey ho!br / div class="separator" style="clear: both; text-align: center;"a href="http://4.bp.blogspot.com/_Fkx1-w7uSqA/S5lLXnPFfzI/AAAAAAAABAU/eBgneBMjzlc/s1600-h/ohno.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"img border="0" height="124" sr [read] Keywords: blogger
26


New family blog
Thu, Mar 11th 2010 3:24p   Steve McDonagh
Just a heads up.. I have started a new non-techie blog for the McDonagh Clan over at http://slightlydoolally.com br / I will keep up the techie particularly Yellow tinted posts here but all the "noise" i was infamous for will now be over on Slightly Doolally, so I might be able to reclaim a certain level of professionalism here ... no perhaps not.. ;)br / br / Ohh my better half has started blogging as an assiociated Admin on Slightly Doolally, so if you do browse over ... please say hi to us bo [read] Keywords: admin blogger blogging
91


My mother helps stop MSDS (Memory Stick Disappearnce Syndrome)
Mon, Mar 8th 2010 6:25a   Steve McDonagh
We have all been there.. we are in a meeting or are called to a colleagues PC and we feel we really really need to share some file with that user. So out comes the memory stick and into the other PC it goes .. and as soon as the file is copied your prized memory stick just disappears... poof ... gone.br / br / I have a theory that there is a eddy in the space time continium, the memory chips on the memory stick act as a strange attractor and becon the eddy towards the memory stick and once it ge [read] Keywords: ilug blogger office twitter
35


Is "a" Sandwich a category error and can mayonasie dribble be accurately measured
Sat, Mar 6th 2010 11:25a   Steve McDonagh
I was sat in a href="http://www.groundcoffee.net/pages/about.htm"Ground/a Having the usual excellent Chill, chicken, bacon, roast pepper, cheese and onion panini with a white chocolate Moccha no cream (Well i am on a diet) Now it was pointed out to me recently when you buy a panini you are actually doing nothing of the sort! You are noshing down on a PANINO for PANINI is the plural.br / br / Now it occured to me that a Ground Panino is a foot long and to fit on the plate the very nice baristas c [read] Keywords: blogger mac
21


Good Music , good company and craic in the nineties @ the Beflast songwriters festival
Fri, Mar 5th 2010 9:24p   Steve McDonagh
Having spend the last 10 weeks in the purgatory that is the post Christmas anticlimax I decided that a bit of fun was in order. So I booked SWMBO and myself into the a href="http://www.dukesatqueens.com/"Dukes Hotel/a in Belfast for the weekend of the a href="http://www.belfastnashville.com/"6th Annual Guinness Belfast Nashville Songwriters Festival/a now that might sound a little bit too country and western for my taste and yes there was some Camp;W but we managed to avoid it :-)br / br / I hav [read] Keywords: blogger community email ipod myspace wiki
50


If curling were easy it would be called Hockey
Mon, Mar 1st 2010 6:24p   Steve McDonagh
span class="goog-spellcheck-word"T'other/span span class="goog-spellcheck-word"nite/span I was chatting to span class="goog-spellcheck-word"Duffbert/span about the fine art of Curlingbr / Whichnbsp; rests vampire like in the popular consciousness for 4 years andbr / then explodes on the moonbeam of publicity that the winter Olympics brings.br / br / All of a sudden the media is full of "houses", "Skips" "Stones" and "Ends"br / However as my chat with the bold Mr span class="goog-spellcheck-word" [read] Keywords: blogger mac
111


ILUG 10 Preperations gathers pace ... poster ideas
Wed, Feb 24th 2010 6:23p   Steve McDonagh
The throb of antipication has moved from barely noticable into "shit itis only 9 months away" mode. 9 month's eh? I have time to get pregnant and give birth before the crowds of the faithful descend on Ireland for another round of ILUGy excitment.br / br / Here are a few posters ideas that may or may not be usedbr / br / div class="separator" style="clear: both; text-align: center;"/divdiv class="separator" style="clear: both; text-align: center;"/divdiv class="separator" style="clear: both; tex [read] Keywords: ilug blogger




88


Access the clipboard in Javascript
Sun, Feb 14th 2010 9:24a   Steve McDonagh
Now here is a wee something I fell over the other day whislt trying to figure out a way of copy and pasting a text stream from a Turdcopy; document to a text area on a form. It would be really useful to grab the clipboard contents .. do some RegExp replaces on it and then import it into the text area.br / br / Well after a moment or two's research you can be done in IE and you have to tweak Moz browsers a href="http://www.mozilla.org/editor/midasdemo/securityprefs.html"see here/a to allow it to [read] Keywords: blogger javascript
59


....and while I am at it, Ireland WTF?
Sun, Feb 14th 2010 8:23a   Steve McDonagh
... ohh and while I am at the keyboard and logged on to the blog ...What the hell were Ireland thinking yesterday? Jeeze I mean to say what is the point of me getting all prepared with loads of beer and crisps and the other accoutrements of 6 Nations watcherdom and then you sent the under 13's instead of the real international team?br / br / Go home dig out the SKY+ box and watch the Wales vs Scotland game, now THAT was rugby at it's best!div class="blogger-post-footer"img width='1' height='1' s [read] Keywords: blogger
40


Enthusions and Indifferons - The physics of not being arsed
Sun, Feb 14th 2010 8:23a   Steve McDonagh
It has been a while since I last sat at the keyboard to write a blog post of any kind and to be honest I think I reached the rubicon between "arsed" / "can't be arsed" and Julius Caesar like I marched resolutely in the territory "can't be arsed". Mind you instead of declaiming "ālea iacta est" (The die is cast) or something equally as memorable I think I may have sighed deeply and poured another cup of coffee.br / br / There comes a time in every diariest's life where you start to slip into the [read] Keywords: domino blogger blogging office outlook




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - FAQ - Mobile Edition