4 Replies Latest reply on Sep 18, 2012 4:31 PM by Justin Funk

    Rhoconnect source login method vs application authenticate method

      I'm trying to get information on what the difference between the Login method found in generated Rhoconnect Source code is and the Authenticate method found in Application code.  They both seem to be used for authentication against the data source, so I'm unsure which should be used for what purpose, if they work together, or if they are meant to be used for two different things?

       

      Here are the details on what my setup will ultimately be:

      Rails web server that hosts the data.  This will use a combination of direct ActiveRecord model data access through Rhoconnect Plugin, and non-direct data access through a JSON API.

      Rhoconnect application for accessing the data from the Rails server through Source and Plugin methods

      Rhomobile client application

        • Re: Rhoconnect source login method vs application authenticate method

          If you use Rhoconnect plugin, then authenticate method in Application class is never called, and authenticate method you defined in Rhoconnect.configure is used instead. That method should do all auth logic based on user credentials (login/password).

           

          If plugin is not used (for rhoconnect it means that app server value n/a; see field  'Backend App URL'  in rhoconnect web console), then

          authenticate method in Application class is called and  you should implement it properly.

            • Re: Rhoconnect source login method vs application authenticate method

              Okay, that clears up the authenticate method, and I'm familiar with how to do that in the plugin.

               

              I have questions on how that will play out in my situation however, where I am using both Plugin and non-Plugin data sources.  How do the non-Plugin sources, which use a JSON api to talk to the Rails server, handle their authentication?  Is there a way to access the credential information gained from the plugin authentication, or do I need to implement the authentication on the Rhoconnect side?  Can I even mix to two source types within one application?