Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 419509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:47:04+00:00 2026-05-12T18:47:04+00:00

I have a Joomla site and a Flash app (in Flex, if it matters).

  • 0

I have a Joomla site and a Flash app (in Flex, if it matters). The Flash app is using BlazeDS as back-end. All the things are hosted in the same server, same domain.

Are there anyway to implement SSO for the above environment?

Update:

What I want is:
If the user logged in at Joomla, they will be auto logged in at the Flash app. Same vice versa.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:47:04+00:00Added an answer on May 12, 2026 at 6:47 pm

    You’ll need to create a component to handle the login.

    The actual login code is very simple. Here is an example from a component we developed for Joomla1.5.

    /**
         * Log into Joomla
         * @return Bool Login Status
         * @param $username String
         * @param $password String
         */
        function login($username, $password, $remember = false) {
            if ($username && $password) {
                $mainframe =& JFactory::getApplication();
                return $mainframe->login(
                    array('username'=>$username, 'password'=>$password),
                    array('remember'=> $remember, 'silent'=>true)
                );
            }
            return false;
        }
    

    If you don’t want to create a full component, then you can use the PHP Component from this page: http://www.fijiwebdesign.com/products/joomla-php-pages.html

    Which ever you use, the important thing is how to generate the URL to log into Joomla. It will look like:

    example.com/index.php?option={com_component}&template=component&no_html=1
    

    where {com_component} is the name of your component.

    In the case of using Joomla PHP Component it would look like:

    example.com/index.php?option=com_php&Itemid={itemid}&template=component&no_html=1
    

    Where Itemid is the menu Itemid of the page you create for your PHP component. It is generated after you create a Menu Item for the PHP component for your PHP page.

    The &template=component&no_html=1 makes sure only the component HTML is loaded, and no_html means that it will not load any HTML declaration.

    Thus you can have some code that for instance returns a JSON or XML response, that your Flex App can consume via a URLLoader or similar request. Or simply just the the string TRUE, or FALSE.

    Update:

    Ooops, sorry that’s not want I want. I
    want if the user logged in at Joomla,
    they will be auto logged in at the
    Flash app. Same vice versa.

    I’m assuming you want to keep your user account in the Joomla database but you’ll have to be specific if you plan to store user data somewhere else.

    Here is how to check if a user is already logged in on Joomla:

    $User =& JFactory::getUser();
    if (!$User->guest) {
      // user is logged in
    } else {
      // user is not logged in
    }
    

    Here is how to get the users session ID:

    $Session =& JFactory::getSession();
    $sessid = $Session->getId();
    

    To get the Session name:

    session_name();
    

    Example of sending user and session data from Joomla to Flash:

    $User =& JFactory::getUser();
    $Session =& JFactory::getSession();
    // for example use JSON which Flex undertands
    echo json_encode((object) array('user'=>$User, 'session'=>$Session, 'name'=>session_name ());
    

    How you implement the retrieval of User and Session data is up to you. You could have Flash send HTTP requests to Joomla, or you could use flash vars, or ExternalInterface (http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html).

    The more important part is passing your session name and ID between Flex and the Browser. You need the session name so that you can set the session cookie in the browser. The cookie should be named the same as the session name, and it’s value should be the session ID.

    You can use ExternalInterface to set the cookie with Browser JavaScript.

    Once the cookie is set, both Flex and the Browser are sharing the same user session and will show the user logged in.

    You can also do the same thing between BlazeDS and Joomla and then have Flash talk to BlazeDS to get the session information.

    At the other end, if a user logs in via Joomla, you then pass that session to Flash using flashvars when you embed the flash, or use ExternalInterface.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have just started using Google Chrome , and noticed in parts of our site,
I would like to add content to my Joomla! site by using an .xml
I have a joomla site where users can log in. Once logged in, a
Hi I have a Joomla site with a template that has 2 columns. One
i m developing one joomla site,, i have assign one article to home page.
We have a standalone script on our site that sits adjacent to a Joomla
I have joomla installed on my brothers server using softaculous in cpanel. But my
I've been working with the Joomla framework and I have noticed that they use
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have Joomla 1.5.9 running with php 5.2.8, mySQL 5.1.31 on IIS7 on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.