OAuth2 Module - Run module with LegacyUI only
In the current state, OAuth2 module supports OpenMRS Reference Application version 2.x.
If you want to use the module with just LeagcyUI and not Reference Application, then just do the following changes to the WebModuleApplicationContext.xml :
<!--User Login Page used prior to Authorization Code Grant Type-->
<http disable-url-rewriting="false"
xmlns="http://www.springframework.org/schema/security"
use-expressions="false">
<!--access-denied-handler error-page="/referenceapplication/login.page?authorization_error=true"/-->
<access-denied-handler error-page="/login.htm?authorization_error=true"/>
<intercept-url pattern="/ws/oauth/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<intercept-url pattern="/ws/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<intercept-url pattern="/ms/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<!--intercept-url pattern="/login*" access="IS_AUTHENTICATED_ANONYMOUSLY"/-->
<http-basic entry-point-ref="UserAuthenticationEntryPoint"/>
<headers disabled="false"/>
<!--form-login login-page="/login.htm" default-target-url="/referenceapplication/home.page"
login-processing-url="/login.htm" authentication-failure-url="/referenceapplication/login.page"/-->
<form-login/>
<csrf disabled="true"/>
</http>
All other UI functionality exists in the module