Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / December 2004



Tip: Looking for answers? Try searching our database.

CFLOGIN w/ Remoting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pudrocker - 09 Dec 2004 03:33 GMT
Extreme newbie here, so please bear with me. Could someone please explain to me
if this code is valid?

<CFFUNCTION NAME = "myLoginFunction">
<CFLOGIN>
<CFIF isDefined("cflogin")>
<CFQUERY NAME="query"
DATASOURCE="MyDatabase">
SELECT Roles FROM SecurityRoles
WHERE username='#cflogin.name#'
and password='#cflogin.password#'
</CFQUERY>
<CFIF query.recordcount gt 0>
<CFLOGINUSER NAME = "#cflogin.name#"
PASSWORD = "#cflogin.password#"
ROLES = "#trim(query.Roles)#" >
</CFIF>
</CFIF>
</CFLOGIN>
</CFFUNCTION>

Is this possible to do? ..or is it only valid to utilize this particular code
inside of Application.cfm as in:

<CFAPPLICATION NAME="myLoginApp">
<CFLOGIN>
<CFIF isDefined("cflogin")>
<CFQUERY NAME="query"
DATASOURCE="myDatabase">
SELECT Roles FROM SecurityRoles
WHERE username='#cflogin.name#'
and password='#cflogin.password#'
</CFQUERY>
<CFIF query.recordcount gt 0>
<CFLOGINUSER NAME = "#cflogin.name#"
PASSWORD = "#cflogin.password#"
ROLES = "#trim(query.Roles)#" >
</CFIF>
</CFIF>
</CFLOGIN>

I guess I'm getting confused as how to pass access <CFLOGIN> via Actionscript,
without accessing it from calling a specific ColdFusion Function - as in:

function CallSecureCFC() {
CFCResponse_txt.text = "";
CFCError_txt.text = "";
gatewayConnection.setCredentials
(userid_txt.text, pwd_txt.text);
myCFCService.myLoginFunction();
}

Perhaps, the last example has an inner functionality in accessing
Application.cfm internally that isn't apparent on the surface?

A general push in the right direction is greatly appreciated.

Thanks,
pud
juanjo75 - 16 Dec 2004 20:21 GMT
Hi.. don't panic.. I also tried the same first approach, but it did not work..
I try not to write my cflogin tag at my application, but it did not work...
here is what I did, in order to avoid having the cflogin tag at application.cfm
//application.cfm, flash needs to use setCredential which will direct to
application, there is no other way around, sorry.. <cfinclude
template='application_extension/login_access.cfm' >  //at my coldfusion
template page.. <cflogin> <cfif isDefined( 'cflogin' ) >         <!--- check with
visit.fc_loginCheck if user is able to login --->  //i use a session object
that store an instance of my security component.... <cfif
session.struct.securityComponent.loginCheck( str_userName='#cflogin.name#',
str_userPassword='#cflogin.password#' ) eq true > <cfloginuser name =
'#session.stc_visit.USER_NAME#'    password = '#session.stc_visit.PASSWORD#'  
roles = '#session.stc_visit.ROLE_NAME#' > </cfif> </cfif>    </cflogin>   
pudrocker - 25 Dec 2004 00:25 GMT
Jaunjo,

Thank you very much for your reply. I'll test this locally and post my
progress.
BTW, how would you rate the performance of your login system since you started
using remoting? Have you had any other bugs or speed issues that we should be
aware of?

I think Macromedia really needs to provide more support in this area. Sure
there are many sites on the net explaining how to do this; however, nearly
everyone explains it in a completely different way. Plus, more often than not,
there is rarely any date attached to the tutorials which makes it difficult to
assume that these methods have not been depreciated in favor of others. Some
standard practices would be nice.

Thanks Again,
pud
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.