Skip to main content
1-Visitor
May 27, 2014
Question

Redirect to a new mashup through service

  • May 27, 2014
  • 3 replies
  • 2889 views

Hi,

I want to redirect to a new mashup from an existing mashup based on a condition. How can i do this from a service? This is for a login page.On Login button click of mashup I have to check if a user exists in database and navigate to a new page if it is a valid user.

    3 replies

    5-Regular Member
    May 27, 2014

    Hi Raj,

    What type of system are you using for authentication? Are you authenticating with a database (e.g. MySQL) or a directory service (e.g. LDAP)?


    Thanks,

    Adam



    rajgs1-VisitorAuthor
    1-Visitor
    May 28, 2014

    Hi Adam,

    Yes i am planning to authenticate with a database(Oracle). I have created a Login Mashup. On click of Login/Sign in button i query whether the entered user id and password is present in the database. If yes i want to naviagete to a new mashup, or else i would want to show an error message of Authentication failure.

    Regards,

    Raj

     

    5-Regular Member
    June 3, 2014

    Raj,

    I don't know that authenticating from a Mashup will work for your use case. In order to view your login Mashup, a User would need to authenticate first with ThingWorx. That seems like a less than ideal user experience given that a User will need to authenticate twice.

    1-Visitor
    June 2, 2014

    Hi,
    Not sure if this got solved, but we created two services, one that looks for the user in the database first. Depending on the result (true/false), we pass this as a parameter to another service that returns a string, this is the name of the mashup we want to navigate to, with the help of the Navigation widget.
    Now, we are wondering if is it possible to navigate passing a mashup parameter through the navigation widget or via some other way.

    Thanks,
    Jose



    5-Regular Member
    June 3, 2014

    Jose,

    You can indeed pass Mashup Parameters using the Navigation widget. Since you'll be dynamically assigning the Mashup to the Navigation, you'll need to select a Mashup and bind each parameter (parameters will appear as properties of the Navigation widget) then repeat for the next possible Mashup.


    Let me know if you need further information or if you would like to have a quick call and have me show you.


    Thanks,

    Adam