The process of obtaining the logged in user is easy as:
The returned object contains the following properties:
- username
- tenantId
Important Note: Special care must be taken when using the tenantId property in the above object in Store application. This is due to the fact that a user can access the Store using a tenant URL thus the tenant Id of the currently logged in user may not always be the tenant Id of the store view.In order to ameliorate this difficulty the Store provides a tenant API which can be used to obtain tenant specific resources.For the complete API please consult the source [1].
Reference
[1] https://github.com/wso2/carbon-store/blob/master/apps/store/modules/tenant-api.js
No comments:
Post a Comment