Consuming MAMBU services into Outsystems

Hello every one, this is my first post here, I am new in Outsystems and I am traying to consume Mambu services into Outsystems, everything is ok when i put the Authentication in hardcore bur what I want to know is how can I conect to Mambu dinamically depending of the user is logged in Outsystems


I hope you can help me with this

Hi Rafael,

Are the Mambu services REST based? If so, what kind of dynamic connection do you need for different users?

Hi Rafael,

MAMBU uses basic authentication according to theirdocumentation, so a username and password defined in MAMBU needs to be used.

Consuming REST APIs using Basic Authentication are supported out of the box in OutSystems.

See for more information:

Regards,

Daniel

Well, if it's basic authentication, and since every user has its own username/password, you can't use the standard basic authentication with OutSystems, as it assumes an immutable username/password for all connections.

Hi Kilian,

Your right, I forgot to take in account the request to have this depend on the OutSystems user.

Wouldn't it be possible to build the basic Authorization header with the following syntax and logic in the OnBeforeRequest handler? something like this: (just coded to visualize the idea, not tested)

Regards,

Daniel




Hello every one, and thanks for your anwers, they were very helpful, and I tried the solution Daniël Kuhlmann sugested, but that doesn't work because the password it is already encrypted, so when I use that the service's response is 401 (unauthorized) 

So I am reading a lot to solve this problem i hope I can find somthing to this topic.


Thank you again guys

Regards

Hi Rafael, 

If I understand correct

  1.  A user has an outsystems users account and logs in to an OutSystems application.
  2. The user also has a MUMBA account 
  3. The OutSystems application needs to call the MUMBA REST API with basic authentication

The above would require the OutSystems application to have the MUMBA credentials for the user, options for this are:

  1. Let user enter his/her username + password for MUMBA. You can store them in a UserExtended entity. In this case don't hash the password (what OutSystems does) but encrypt it.
  2. On the call to the MUMBA RestAPI you can get these MUMBA username and password from the User ExtendedEntity, decrypt the password, and then use them to set the Authorization header as I described before.

Regarding the UserExtended entity:

  1. To associate custom information with a User's Entity Record create an new Entity called UserExtended
  2. Define a a 1-to-1 relationship with the non-editable User's Entity, by modifying the Data type of the Identifier to User Identifier
  3. Add MUMBAUserName attribute 
  4. Add MUMBAPassword attribute

Regards,

Daniel

Hi Rafael,

Did you get it working eventually?