Hello, I am writing a Ruby on Rails application with Flex as the front end. The RoR is installed on linux and Flash UI interacting with Rails via HTTPService is running on Windows. I need to find the windows loginname of the user using my application to perform some basic authentication, and perhaps display Hello <username> too. :) Could you please let me know how that could be made possible. Many Thanks in advance, Aman -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Aman, I don''t know how to do it from Flash (and thus Flex). I doubt it''s possible to do in straight ActionScript. That said, if it is possible to use JavaScript to get it, you can have JavaScript get it and then tell Flex via the Flex-Ajax Bridge (http://labs.adobe.com/wiki/index.php/Flex_Framework:FABridge). Since I''m not a JavaScript / ActiveX guru, I don''t know if this is possible. One solution I have seen from googling is here: http://www.codingforums.com/archive/index.php?t-5057.html That said, why don''t you just use a standard login system (e.g. login_generator, acts_as_authenticated, restful_authentication) on the Rails side (or roll your own, as is done in AWDwR) rather than trying to get the Windows login name from Flex? This would be more reliable than relying on JavaScript (which the user may have disabled) and IE (since I assume that the ActiveX solution shown at codingforums is IE-only). Furthermore, why limit yourself to Windows clients when you can support Mac clients as well with *less* effort on your part? Cheers, Peter Armstrong P.S. Shameless plug: I have examples of Flex talking to Rails--both using login_generator and using restful_authentication--in my PDF-only book Flexible Rails (http://www.flexiblerails.com). You can download its MIT-licensed source code for free from http://www.flexiblerails.com/files/FlexibleRailsBookCode.zip to see how this works, regardless of whether you buy the book... On 1/23/07, Aman Thind <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hello, > > I am writing a Ruby on Rails application with Flex as the front end. > > The RoR is installed on linux and Flash UI interacting with Rails via > HTTPService is running on Windows. > > I need to find the windows loginname of the user using my application to > perform some basic authentication, and perhaps display Hello <username> > too. :) > > Could you please let me know how that could be made possible. > > Many Thanks in advance, > Aman > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you so much Peter! Yes I''ve confirmed that Flash can not provide the windows loginname to me. I was bent on acquiring the windows username for authentication as I do not want to prompt the user for a username or password. The list of users allowed to operate the application is very small and can be authenticated against their windows id to mimic a single-signon. Do you think solutions like Net::LDAP or login_generator could fit the bill? Many Thanks, Aman -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Aman Thind wrote:> Thank you so much Peter! > > Yes I''ve confirmed that Flash can not provide the windows loginname to > me. > > I was bent on acquiring the windows username for authentication as I do > not want to prompt the user for a username or password. > > The list of users allowed to operate the application is very small and > can be authenticated against their windows id to mimic a single-signon. > > Do you think solutions like Net::LDAP or login_generator could fit the > bill?when i was trying to find a way to use windows authentication, the only way i could find was by using a webserver that itself understands windows-auth (so IIS for me). and then proxy the requests to mongrel(s) (or whatever server runs your rails app). see my post with a little howto at http://www.ruby-forum.com/topic/91247 perhaps this helps, ralf -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---