I need to add multiple credentials for one API in wso2 MI. How to achieve this?
Asked
Active
Viewed 53 times
0
-
1You can follow this guide - https://ei.docs.wso2.com/en/7.0.0/micro-integrator/use-cases/examples/rest_api_examples/securing-rest-apis/#securing-rest-apis – Pubci Oct 26 '22 at 06:17
1 Answers
0
If you want to allow a selected set of users to access an API you may have to use role-based authorization. Where you can create a role in MI and assign this role to the users you wish to give access to, then white list this role in the API. For this, you can use this Custom Handler and engage it like shown below.
<handler class="com.ycr.auth.handlers.AuthorizationHandler">
<property name="roles" value="admin,test" />
<property name="authorize" value="true" />
</handler>
You can read more on this here.

ycr
- 12,828
- 2
- 25
- 45