Custom Authentication in Publish REST API

0
Hi Team , I am working on an Application where I am exposing a REST API . Now I have basic authentication and one other authentication based on JWT token that i am currently handling in operations Microflow . But i want to remove basic authentication for which i have to used custom authentication method . Now my question is : Custom authentication microflow should return User information but in my scenario , The call is coming from a System rather then a User . So Azure API’s are not able to get me the user information . What should i return in custom microflow if i want it to work.
asked
2 answers
0

You can create a specific API user with for instance a specific API role in your app to deal with that. In the custom authentication microflow you then retrieve that user. Depending on your needs you can add custom logic and return different users depending on who is calling your API.

answered
0

You can turn off authentication at the service level, then implement your custom checks in the endpoint microflows themselves. So include the HttpResponse object as a parameter in each endpoint microflow. At the beginning of each flow, perform your auth checks, and if they fail then change the response code accordingly and return.

answered