Rest service authentication

2
I'm new to rest services and I try to figure out how authentication should be implemeted. I already succeeded in publishing REST service without authentication, but when I specify a user role when calling "CreateMicroflowService" the servicecall fails (as expected) with an authentication error. The documentation isn't very clear about how to pass the user credentials to the REST service. Also the blog on REST serviced doesn't say anything about this. Can anyone please point me in the right direction (maybe with a small example)?
asked
3 answers
3

You should use the 'AddHeaderToNextRequest' Java Action to add the Authorization header to the request

See the following link for more information:

Mendix Restservices Documentation on Github

answered
0

Our Client want's to use X-Authentication tokens. Is there a way to do this from the REST module?

answered
0

Hi René,

Are you publishing or consuming a Rest service? For sending those tokens, see Pauls answer, use the 'AddHeaderToNextRequest`, for publishing services with custom authentication, see https://github.com/mendix/RestServices#securing-published-services, it is possible to extract the token from the request in the authorization microflow, and authenticate on that one

answered