Product/components used and version/fix level:
1016
Detailed explanation of the problem:
get user credentials
Question related to a free trial , or to a production (customer) instance?
production
Hello,
that is the best/cleanest way to get user credentials for doing REST API requests? IS there a way to get it from c8y client?
thx
greets
Helmut
Hi Helmut,
in case your tenant is still configured for basic auth (see https://cumulocity.com/guides/users-guide/administration/#changing-authentication-settings ) there might be ways of getting the user credentials after the user has already been logged in. This is e.g. done here: https://github.com/SoftwareAG/cumulocity-node-red/blob/main/frontend/src/modules/node-red-iframe/node-red-iframe.component.ts#L56-L63
In case your tenant is configured with OAuth the option from above does not work. Then the only way would be to get them during the user login.
For security reasons we would always recommend to use OAuth instead of basic auth.
Regards,
Tristan
thx for your quick answer
Helmut
system
(system)
Closed
February 25, 2024, 4:18pm
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.