How to use ClientPrincipal with 'progress.data.Session&#

Posted by Daniela Popa on 13-Jun-2018 04:22

Hi,

In Rollbase we use objects from OpenEdge service.

We are currently working to change the user authentication to OpenEdge Authentication (through HybridRealm class) and  the objects authentication from 'No Authentication' to 'Use Current User'.

On the objects pages, we also have javascript code that made direct call to OpenEdge services  using 'progress.data.Session' (see below image) .

How can we use ClientPrincipal with 'progress.data.Session' ? Do you know any links that I can check?

Thanks,

Daniela

Posted by dora.husaru on 05-Jul-2018 02:31

Hi,

You can also use serverside API: rbv_api.sendJSONRequest and add CP_TOKEN to the call headers. As in the example below:


This should be working on both old and new Rollbase UI.

Best regards,

Dora

All Replies

Posted by Anoop Premachandran on 15-Jun-2018 02:10

Client principal is not made available to client side pages directly for obvious security reasons..

However it is available as a token in Server-Side..

We have a new ClientSide API for such usecase

See www.progress.com/.../client-side-rest-invocations-in-rollbase

To use Client Principal, use this token - #CP_TOKEN

Posted by Daniela Popa on 22-Jun-2018 01:07

Hi,

Thanks for the link.

When using rbf_sendHttpRequest, I got the following error: 'Administrator does not allow client-side REST Service calls for this domain:..'; is there something else I need to set or check?

I can see that this is a solution for new UI, is there a solution for old Rollbase UI?

Thanks,

Daniela

Posted by Nitin Kumar Singh on 22-Jun-2018 02:06

To resolve error 'Administrator does not allow client-side REST Service calls for this domain:..' please add host first to the Hosts Whitelist for Client REST API

This option is accessible from application edit settings. Just click on any app -> edit -> scroll down and you should see the option we are talking about.

Posted by dora.husaru on 05-Jul-2018 02:31

Hi,

You can also use serverside API: rbv_api.sendJSONRequest and add CP_TOKEN to the call headers. As in the example below:


This should be working on both old and new Rollbase UI.

Best regards,

Dora

This thread is closed