...
The OAuth2 module is installed like any other module but we have to keep in mind that the order of installation for the OAuth2 module and modules that expose protected resources. It may be important to install the OAuth2 module before any other module resources are to be protected by the OAuth2 module. If the protected module has defined servlet filters in its config.xml, then it becomes mandatory that the OAuth2 module should be installed before the protected module.
For example, the FHIR module has defined a number of filters
To explain this, we need to understand that Spring Security is implemented a Filter Chain that intercepts requests to the protected resources, authenticates the request and then forwards the user to the protected resource. Therefore, it makes sense that the filter chain of spring security should sit before the filters of the protected modules, otherwise spring security would fail to properly authenticate the incoming request. This fact is also mentioned in the documentation of spring security project.
When modules are installed in OpenMRS, the filters are loaded in the order of installation. Therefore make sure that there are so such conflicts when installing the OAuth2 module and OAuth2 module's filters (spring security filter chain) are loaded before filters of protected modules.If there is error in the installation order, server logs would show the following exception
Database Structure
Upon successful installation the following tables will be added to the database :
...
Client Developers are those users of an OpenMRS installation that develop OAuth2 clients i.e applications that use OpenMRS's web services protected by the OAuth2 module. At present, all users are allowed to register OAuth2 clients (via the dashboard). We This will be changing this soon. Only users with proper roles and permissions (client_developer) will be allowed to register clients.
The Admins of the OpenMRS instance can will be able to disable any clients using their dashboard.
...
The admins of OpenMRS instance can can will be see a list of all registered clients
...