Hi All,
This can be achieved with the following:
// Access registry
var carbon = require('carbon');
var url = 'https://localhost:9443/admin/services/';
var server = new carbon.server.Server(url);
var options = {system: true, domain: carbon.server.tenantDomain()
, tenantId: carbon.server.tenantId()};
var registry = new carbon.registry.Registry(server, options);
// Retrieve file
var file = "mapping";
var rawdata = registry.get('/_system/governance/' + file);
print(rawdata.content);
Ref:
[1] http://jaggeryjs.org/documentation.jag?api=registry
[2] http://jaggeryjs.org/documentation.jag?api=user
Thank You!
On Tue, Dec 9, 2014 at 6:21 PM, Buddhima Wijeweera <[email protected]>
wrote:
> Hi All,
>
> I have a requirement of accessing the MetaDatastore with tenant user
> credentials.
>
> The example given in the doc:
> http://jaggeryjs.org/documentation.jag?api=metadatastore explains with
> hardcoding credentials.
>
> How can I do the same by using credentials of current tenant user ? How
> can I get the credentials of an already logged-in user?
>
> Thank You!
>
> --
> Buddhima Wijeweera
> Software Engineer; WSO2 Inc.; http://wso2.com ,
>
> Mobile: +94 71 427 9966
> Email: [email protected]
> Blog: https://buddhimawijeweera.wordpress.com
> GitHub Profile: https://github.com/Buddhima
>
--
Buddhima Wijeweera
Software Engineer; WSO2 Inc.; http://wso2.com ,
Mobile: +94 71 427 9966
Email: [email protected]
Blog: https://buddhimawijeweera.wordpress.com
GitHub Profile: https://github.com/Buddhima
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev