Question
Pt. Asuransi Sinar Mas
ID
Last activity: 14 Oct 2018 22:26 EDT
Creating a mashup: Login problems on another PC
Hi there,
I tried using a mashup in the mobile application I made. I've copied the following HTML into my site to use the mashup and have saved the generated code using ordinary HTML files.
On mashup security I have added a site URL that I added mashup code. When I open the file with my PC there is no problem logging in. But when I open the file on another PC the result is a login page appears.
How can I open the file on another PC when I don't need a login?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Hi,
In your mashup code the data-pega-url is just going to the standard PRServlet as you are just specifying the context root of /prweb. You also have no UserIdentifier or password in a data-pega-action-param-parameters attribute.
This should always trigger the login screen to display. When you test, regardless of machine you are using, make sure you use a new browser instance that is not sharing the Pega-RULES cookie with your developer portal access. In IE use "File-> New Session" or in Chrome "New Incognito window".
If you don't there will not be any authentication as we use browser level Session Cookies and it that cookie is sent in and corresponds to an already authenticated requestor you wont be prompted for authentication.
Pegasystems Inc.
US
Hi,
Can you share the HTML you are using for the Mashup? Just remove hostnames for pzIncludeMashupScripts and data-pega-url. Also, remove anything confidential in data-pega-action-param-parameters.
For data-pega-url what servlet are you using? That might explain different behavior based on what PC you are using.
Pt. Asuransi Sinar Mas
ID
<script src ='http://mylinkapp/prweb?pyActivity=pzIncludeMashupScripts'></script>
<div data-pega-gadgetname ='PegaGadget'
data-pega-action ='createNewWork'
data-pega-action-param-classname ='ORG-MobileAp-Work-MobileApplication'
this is the html that I use and it works on my PC. But when I open this html on my friend's PC, it asks to log in first
Accepted Solution
Pegasystems Inc.
US
Hi,
In your mashup code the data-pega-url is just going to the standard PRServlet as you are just specifying the context root of /prweb. You also have no UserIdentifier or password in a data-pega-action-param-parameters attribute.
This should always trigger the login screen to display. When you test, regardless of machine you are using, make sure you use a new browser instance that is not sharing the Pega-RULES cookie with your developer portal access. In IE use "File-> New Session" or in Chrome "New Incognito window".
If you don't there will not be any authentication as we use browser level Session Cookies and it that cookie is sent in and corresponds to an already authenticated requestor you wont be prompted for authentication.
Pt. Asuransi Sinar Mas
ID
Hi ChrisKoyl,
if I want to add the parameters you say, what parameters should I use for the UserID and password? can you share it?
Thank you.
Pegasystems Inc.
IN
data-pega-action-param-parameters='{"UserIdentifier":"[email protected]","Password":"password"}'
Pt. Asuransi Sinar Mas
ID
hi mohaa1 and ChrisKoyl,
Thank you so much. Now I can use the mashup without having to login. Thank you for your help
-
varnika gupta
Pt. Asuransi Sinar Mas
ID
Hi guys,
I find a problem again about this mashup.
<script src ='http://mylinkapp/prweb?pyActivity=pzIncludeMashupScripts'></script>
<div data-pega-gadgetname ='PegaGadget'
data-pega-action ='createNewWork'
data-pega-action-param-classname ='ORG-MobileAp-Work-MobileApplication'
data-pega-action-param-flowname ='pyStartCase'
data-pega-action-param-model =''
data-pega-action-param-parameters='{"UserIdentifier":"ID","Password":"pass"}'
data-pega-isdeferloaded ='false'
I've made it like this. But why when I open this HTML I have to open my app link first so that this HTML can run?
can you help me ?
Thank you,
Pegasystems Inc.
US
Hi,
The Password has to be base64 encoded or you will be presented with the login screen.
I warn you that anyone viewing your mashup source can get your userid and password. What you are setting up currently should only be used for your own internal testing. At some point you need to work on the authentication that will be used when the gadget is used with the real top level application.