|
Tuesday, October 21, 2008
Logging into the X2O services
We have a series of videos on using the X2O web client and building a data model. We haven't focused, yet, on videos specifically about using the generated SWC and ActionScript code. All the details are available on our docs site, but we'll discuss specific code strategies in this blog.
First up, I want to explain how to log in to the X2O data services from Flex. It's incredibly simple to do - you just have to remember to do it each time you start a new X2O-driven Flex app. We've documented it but I want to explicitly call it out here. Whenever you start a new Flex app with X2O, you first need to drop your generated SWC into the /libs folder of your project. On whichever page you plan on starting your application, you'll need to explicitly call a login method in the X2OManager class as seen below. Typically, you'd use set the applicationComplete property of the mx:Application tag to the init() method below.
Under the covers, the login() method establishes a user's session on the X2O server. It sets up the communication channel between the Flash file and server to ensure incoming requests are validated. All requests require an encrypted one-time-use token from the requester and, in turn, all responses are encrypted. We've done this to better secure communication between X2O and your Flex application. |
||
1 Comments:
test
Post a Comment
<< Home