1. Zhang JX
  2. PowerBuilder
  3. Tuesday, 3 May 2022 08:20 AM UTC

Hi all,

We are deploying the ERP system both in client/server and Cloud mode.

We have added JWT authentication coding for Cloud deployment while skipping such scripts from client/server deployment.

noticed that in both deployment, predefined PBNATIVE = true.

 

thanks,

JX 

 

Accepted Answer
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 3 May 2022 08:44 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi.

You do have two functions:

IsPowerServerApp - - PowerScript Reference (appeon.com)

IsPBApp - - PowerScript Reference (appeon.com)

Unfortunately there is no preprocessor check.

In your case the code doing JWT checks should be under:

if IsPowerServerApp() then
// -> Your JWT code here...
end if

Finally there is a function that does the same check for PowerClient deployed applications:

IsPowerClientApp - - PowerScript Reference (appeon.com)

Andreas.

Comment
  1. Zhang JX
  2. Tuesday, 3 May 2022 11:22 AM UTC
Hi Andreas,

yes, that's what I am looking for, it works perfectly.

Thank you very much.

JX
  1. Helpful
There are no comments made yet.
Zhang JX Accepted Answer Pending Moderation
  1. Wednesday, 4 May 2022 04:47 AM UTC
  2. PowerBuilder
  3. # 1

Hi All,

One more question, is there PB function to get WebApi URL deployed?

I am trying to build admin function to manage sessions(retrieve all, kill etc.), regardless which webapi server deployed to and running.

Best Regards,

JX

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 4 May 2022 05:01 AM UTC
Hi JX, Please post this as separate question. Thanks.
  1. Helpful
  1. Zhang JX
  2. Wednesday, 4 May 2022 05:19 AM UTC
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 4 May 2022 05:31 AM UTC
Thanks
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.